Skip to content

Commit a53d197

Browse files
Dean Soferpetebacondarwin
Dean Sofer
authored andcommitted
docs(ngController): rephrased the description for clarity
1 parent 2bb0e1a commit a53d197

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/ng/directive/ngController.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@
55
* @name ng.directive:ngController
66
*
77
* @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
99
* supports the principles behind the Model-View-Controller design pattern.
1010
*
1111
* MVC components in angular:
1212
*
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
1718
*
1819
* Note that an alternative way to define controllers is via the {@link ngRoute.$route $route} service.
1920
*
2021
* @element ANY
2122
* @scope
2223
* @param {expression} ngController Name of a globally accessible constructor function or an
2324
* {@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`.
2627
*
2728
* @example
2829
* Here is a simple form for editing user contact information. Adding, removing, clearing, and

0 commit comments

Comments
 (0)