`

Angular js scope: the child scope would inherit from the parent scope

 
阅读更多

http://docs.angularjs.org/#!/cookbook/deeplinking

 

Learn from this example, the child controller would inherit the function and properties from the parent controller.

 

The "person" attribute in declared in "AppCntl" which is the parent. But "WelcomeCntl" as a subcontroller can use it, provided that " $route.parent(this);" has added "AppCntl" as the parent controller.

 

 

分享到:
评论
1 楼 mistake 2012-07-30  

..............

相关推荐

Global site tag (gtag.js) - Google Analytics