javascript - AngularJS ng-controller not working -


I have started learning from AngularJS right now, I am trying to practice examples that he mentions in the tutorial Have done Everything works fine, but when I came in "AngularJS Controllers" it is not working properly. I have left my code in this. My script looks like this:

  Function person controller ($ scope) {$ scope.firstName = "John"; $ Scope.lastName = "DO"; }  

Help me and recommend me a good tutorial (or any free PDF file).

This is your .

It is a good practice for angular that the definition of controller should look like this:

  Angular Module ("app", []) controller ("person controller", function ($ radius) {$ scope.firstName = "John"; $ scope.lastName = "doe";});  

And, without doubt, the best tutorial for learning the basics cornerery is !

Hope it helps.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -