You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 451eb2f
Browse filesBrowse the repository at this point in the historyBrowse files
{"ng-app": "Tells AngularJS to be active in this portion of the page. In this case the entire document."
537
538
,"angular.min.js": "Load AngularJS."
538
539
,"todo.js": "Your behavior lives in JavaScript controllers."
539
-
,"ng-controller": "The behavior of content under this element will be managed using the <code>TodoCtrl</code> class defined in <code>todo.js</code>."
540
+
,"ng-controller": "The behavior of content under this element will be managed using the <code>TodoController</code> class defined in <code>todo.js</code>."
540
541
,"{{remaining()}}": "The <code>{{ }}</code> are a declarative way of specifying data binding locations in the HTML. AngularJS will automatically update this text whenever the <code>remaining()</code> function return value changes."
541
542
,"ng-click": "Instead of registering event-handlers, you declare which method on the controller to call. Here clicking the link will call <code>archive()</code> method."
542
543
,"ng-repeat": "Use <code>ng-repeat</code> to unroll a collection. Here, for every object in <code>todos</code>, AngularJS will create new copy of the <code><li></code> element. When objects are added to the <code>todos</code> collection the <code>ng-repeat</code> automatically adds new <code><li></code> elements into the DOM. Similarly when the objects are removed from <code>todos</code> then the corresponding <code><li></code> element is removed as well. This is one of the most versatile directives in AngularJS."
@@ -550,7 +551,7 @@ <h2>Todo</h2>
550
551
}
551
552
552
553
,"todo.js":
553
-
{"TodoCtrl": "The controller is the code behind the view. You can clearly see your application behavior because there is no DOM manipulation or framework specific boilerplate. Just simple, readable JavaScript."
554
+
{"TodoController": "The controller is the code behind the view. You can clearly see your application behavior because there is no DOM manipulation or framework specific boilerplate. Just simple, readable JavaScript."
554
555
,"$scope": "<code>$scope</code> contains your model data. It is the glue between the controller and the view. The <code>$scope</code> is just one of the services that can be injected into the controller."
555
556
,"todos": "We are creating the model with two initial todo items. Notice that you simply assign your model to the <code>$scope</code> and AngularJS reflects the state in the UI automatically. The model data is a Plain-Old-JavaScript-Object no need to wrap it in proxy or accesses the property through special setter methods."
556
557
,"addTodo": "We are assigning the behavior into the <code>$scope</code> so that the <code>ng-submit</code> can invoke it."
0 commit comments