I am new to angular js and I am trying to build an application using it.
I would like to pass some json data to controllers on pageload, so i
thought using setting the value to a variable using ng-init and later
access that variable from the scope.
But for some reason ng-init throws parsing errors when i try to initialize
with a json value in my jsp page.
My sample json string :
*{*
* "contractId": "53e4fbdd7e230346b2c94fa"*
*}*
But when i modify json string a little bit then it is working. But the
catch here is the one that is working is not a valid json .
*{*
* contractId: '53e4fbdd7e230346b2c94fa'*
*}*
http://jsfiddle.net/TM4KQ/34/
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.