docs(ngController): rephrased the description for clarity

This commit is contained in:
Dean Sofer 2013-09-13 05:38:59 -07:00 committed by Pete Bacon Darwin
parent 2bb0e1a604
commit a53d197db3

View file

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