|
5 | 5 | * @name ng.directive:ngController
|
6 | 6 | *
|
7 | 7 | * @description
|
8 |
| - * The `ngController` directive assigns behavior to a scope. This is a key aspect of how angular |
| 8 | + * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular |
9 | 9 | * supports the principles behind the Model-View-Controller design pattern.
|
10 | 10 | *
|
11 | 11 | * MVC components in angular:
|
12 | 12 | *
|
13 |
| - * * Model — The Model is data in scope properties; scopes are attached to the DOM. |
14 |
| - * * View — The template (HTML with data bindings) is rendered into the View. |
15 |
| - * * Controller — The `ngController` directive specifies a Controller class; the class has |
16 |
| - * methods that typically express the business logic behind the application. |
| 13 | + * * Model — The Model is scope properties; scopes are attached to DOM where scope properties |
| 14 | + * are accessed through bindings. |
| 15 | + * * View — The template (HTML with data bindings) that is rendered into the View. |
| 16 | + * * Controller — The `ngController` directive specifies a Controller class; the class contains business |
| 17 | + * logic behind the application to decorate the scope with functions and values |
17 | 18 | *
|
18 | 19 | * Note that an alternative way to define controllers is via the {@link ngRoute.$route $route} service.
|
19 | 20 | *
|
20 | 21 | * @element ANY
|
21 | 22 | * @scope
|
22 | 23 | * @param {expression} ngController Name of a globally accessible constructor function or an
|
23 | 24 | * {@link guide/expression expression} that on the current scope evaluates to a
|
24 |
| - * constructor function. The controller instance can further be published into the scope |
25 |
| - * by adding `as localName` the controller name attribute. |
| 25 | + * constructor function. The controller instance can be published into a scope property |
| 26 | + * by specifying `as propertyName`. |
26 | 27 | *
|
27 | 28 | * @example
|
28 | 29 | * Here is a simple form for editing user contact information. Adding, removing, clearing, and
|
|
0 commit comments