Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upNg-Click comming from Ng-Include doesn't interpolate $index #13750
Comments
|
Please ask support questions on one the support channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Angular: 1.4.3
I'm try to inject some dynamic html using ngInclude, ngRepeat and the $index, but I'm having some troubles on ngClick,
something like that:
And inside the
include3.htmla have some codes, all using the $index to keep the dynamism.All the
"$index"are being interpolated, except onng-clickng-click="showConfigPanel($index)"the html doesn't interpolate and inspecting the element it appears asng-click="showConfigPanel($index)"ng-click="showConfigPanel({{$index}})"it shows"Error: [$parse:syntax] Syntax Error: Token '{' invalid key ..."ng-click="showConfigPanel('{{$index}}')"the html is rendered asng-click="showConfigPanel('0')"but if I click on it link the value passed to the function is'{{$index}}'not0I tried the solution in this issue #4627, something like that
ng-click="showConfigPanel(''+$index)"orng-click="showConfigPanel('test'+$index)"but it stills writing literally the"$index"Exist any workarround on it?