mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-21 00:40:24 +00:00
docs(ngController): remove obsolete mention of scope as this in controller
Controllers are now (since angular 1.0) instantiated as regular constructorsand the scope is injectable as $scope rather than being referenced as `this` in controller methods.
This commit is contained in:
parent
bdde40e755
commit
5fedfd79a5
1 changed files with 3 additions and 5 deletions
|
|
@ -25,11 +25,9 @@
|
|||
*
|
||||
* @example
|
||||
* Here is a simple form for editing user contact information. Adding, removing, clearing, and
|
||||
* greeting are methods declared on the controller (see source tab). These methods can
|
||||
* easily be called from the angular markup. Notice that the scope becomes the `this` for the
|
||||
* controller's instance. This allows for easy access to the view data from the controller. Also
|
||||
* notice that any changes to the data are automatically reflected in the View without the need
|
||||
* for a manual update.
|
||||
* greeting are methods declared on the $scope by the controller (see source tab). These methods can
|
||||
* easily be called from the angular markup. Notice that any changes to the data are automatically
|
||||
* reflected in the View without the need for a manual update.
|
||||
<doc:example>
|
||||
<doc:source>
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue