Update to Angular 1.1.4
This commit is contained in:
parent
72a485d6e8
commit
f5fc1369ad
585 changed files with 48055 additions and 3041 deletions
7
lib/angular/docs/partials/guide/dev_guide.mvc.understanding_controller.html
Normal file → Executable file
7
lib/angular/docs/partials/guide/dev_guide.mvc.understanding_controller.html
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
|||
<h1><code ng:non-bindable=""></code>
|
||||
<span class="hint"></span>
|
||||
</h1>
|
||||
<div><p>In Angular, a controller is a JavaScript function(type/class) that is used to augment instances of
|
||||
<div><a href="http://github.com/angular/angular.js/edit/master/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc" class="improve-docs btn btn-primary">Improve this doc</a><p>In Angular, a controller is a JavaScript function(type/class) that is used to augment instances of
|
||||
angular <a href="guide/scope">Scope</a>, excluding the root scope. When you or Angular create a new
|
||||
child scope object via the <a href="api/ng.$rootScope.Scope#$new"><code>scope.$new</code></a> API , there is an
|
||||
option to pass in a controller as a method argument. This will tell Angular to associate the
|
||||
|
@ -176,8 +176,9 @@ have a look at an example:</p>
|
|||
<body ng-controller="MainCtrl">
|
||||
<p>Good {{timeOfDay}}, {{name}}!</p>
|
||||
<div ng-controller="ChildCtrl">
|
||||
<p>Good {{timeOfDay}}, {{name}}!</p>
|
||||
<p ng-controller="BabyCtrl">Good {{timeOfDay}}, {{name}}!</p>
|
||||
<p>Good {{timeOfDay}}, {{name}}!</p>
|
||||
<p ng-controller="BabyCtrl">Good {{timeOfDay}}, {{name}}!</p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
function MainCtrl($scope) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue