Hi everyone, I am using this guide: 
http://www.angularjsbook.com/angular-basics/chapters/controllers/
to learn about controllers and general angular javascript with very basic 
javascript knowledge already. I am putting to this code together apparently 
the wrong way and it is not running and displaying the message as it 
should. Could you please tell me what I am doing wrong?

Here's my code:

<html>
<script 
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.js";>


<body ng-app="app">
  angular.module('app', []);
  angular.module('app').config(['$controllerProvider', 
function($controllerProvider) {
    $controllerProvider.allowGlobals();
  }]);
  <p ng-controller="EmptyController">

  </p>

  function MessageController() {
  this.message = "This is a model.";
  }

  <p ng-controller="MessageController as controller">
  {{controller.message}}
  </p>

</body>
</script>

</html>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to