If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!
Commented on:
Some examples on getting started with angular.js and dealing with the handlebars delimiters.
Hosting graciously provided by:
0
ramstein74 10 years ago
I´m want to export a variable from my web2py controller to my controller.js and for example using your first suggestion and trying a ng-repeat with the array[1,2,3]
in my web2py controller if i do
x=[1,2,3]
return dict(x=x)
then in my controller.js i cannot access my x variable.
$scope.cods= "<?=cods?>";
i get this error
Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: x in cods|filter:search, Duplicate key: string:?
However if i embed my controller.js code in my web2py view it works
Why?
replies (1)