Question

So my problem is kind of self explanatory, I want to pass a parameter which I get from the angular template engine as a parameter.

Something like:

<div ng-click="model.myFunc({{user.id}})">click me</div>

the problem is that any other numeric value passed as a parameter works fine, as emphasized by the following plunkr: http://plnkr.co/edit/GqTDpc?p=preview

But once I am trying to use a value from the template engine, it breaks.

A plunker that emphasizes my exact problem: http://plnkr.co/edit/FdlBQ1

Was it helpful?

Solution

Code changed in nested1.html

<div ng-init="temp=user.id"data-ng-click="layout.toggleNestedContent(temp)" style="cursor:pointer;">
{{user.name}} {{user.id}} Click me in order to display the other nested box!
</div>

Check below is the working example

Working Demo

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top