mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-18 15:50:22 +00:00
add description for ng:controller example
This commit is contained in:
parent
e626f95469
commit
a6c45c3e66
1 changed files with 6 additions and 0 deletions
|
|
@ -46,6 +46,12 @@ angularDirective("ng:init", function(expression){
|
|||
* @param {expression} expression to eval.
|
||||
*
|
||||
* @example
|
||||
* Here is a simple form for editing the user contact information. Adding, removing clearing and
|
||||
* greeting are methods which are declared on the controller (see source tab). These methods can
|
||||
* easily be called from the angular markup. Notice that the scope becomes the controller's class
|
||||
* this. 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 to update it
|
||||
* manually.
|
||||
<doc:example>
|
||||
<doc:source>
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
Loading…
Reference in a new issue