0

I've just started with AngularJS and I was going through a set of Hello World examples and I can't get them running on branch 1.3 of the the library.

HTML code

<html ng-app>
<head>
  <script src="angular.js"></script>
  <script src="controller.js"></script>
</head>
<body>
  <div ng-controller='HelloController'>
    <input ng-model='greeting.text'>
    <p>{{greeting.text}}, World</p>
  </div>
</body>
</html>

controller.js

function HelloController($scope) {
  $scope.greeting = { text: 'Hello' };
}

This works fine in 1.2. I couldn't find the changes that have been made in 1.3 that cause this.

alphadog
  • 10,473
  • 2
  • 13
  • 19

1 Answers1

0

Since Angular 1.3 beta 15, $controller does not look for controllers anymore on window. The AngularJS changelog explains in a clear manner what precisely has changed (scroll to the 'Breaking Changes' section).

Ben
  • 791
  • 6
  • 12