How can i pas values to a function with ng-init in a angular project? i have tried this and it works fine:
<div ng-controller="myCtrl" ng-init="myfunction(1)">
but the problem is, when i do this
<div ng-controller="myCtrl" ng-init="myfunction({{id}})">
or
<div ng-controller="myCtrl" ng-init="myfunction(id)">
it doesn't work!! if i show the value of {{id}} in my template i get the id: 1 so the id does exist.
what is here the problem?