version - Can't put to work angularjs 1.3.1 -


I'm starting with angularjs and I have a really basic issue with version 1.3.1 I have followed a tutorial with the following code:

   & Lt; P & gt; {{Author.company}} & lt; / P & gt; & Lt; / Div & gt; & Lt; Script & gt; Function Microprocessor ($ scope) {$ scope.author = {'name': 'some names', 'company': 'some company'}} & lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

And I'm getting the following results:

{{author.name}}

{{author.company}}

It seems that the angular has not been properly started.

Give your app a name:

   

And then start this and your controller properly:

  var app = angular. Module ('app', []); App.controller ('MyController', MyController);  

You can also copy your script to & lt; Head & gt; in the section, so that {author. Name} does not flash on the screen before the controller starts.


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -