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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -