Yeah I agree, I see a lot of ng-init abuse out in the wild. 

On Monday, January 6, 2014 8:38:49 PM UTC-7, Jeff Federico wrote:
>
> I'm just getting started with Angular, and making a small app to get up 
> and running.  I happened upon the documentation for ng-init, which says, in 
> a nice bold red outline:
>
> The only appropriate use of ngInit is for aliasing special properties of 
> ngRepeat <http://docs.angularjs.org/api/ng.directive:ngRepeat>, as seen 
> in the demo below. Besides this case, you should use 
> controllers<http://docs.angularjs.org/guide/controller> rather 
> than ngInit to initialize values on a scope.
> I just wanted to call attention to the fact that numerous other examples 
> in the doc actually use ng-init, however (here are the search 
> results<https://www.google.com/search?num=50&rlz=1C1LENN_enUS498US498&espv=210&es_sm=93&q=site%3Adocs.angularjs.org%2Fapi%2F+ng-init%3D&oq=site%3Adocs.angularjs.org%2Fapi%2F+ng-init%3D&gs_l=serp.12...0.0.0.7004.0.0.0.0.0.0.0.0..0.0....0...1c..32.serp..0.0.0.-afeAPboLrU>showing
>  this).  So maybe those should be updated, if the above paragraph is 
> correct.
>
> Otherwise, I really enjoying using Angular; thanks so much for the great 
> open-source contributions!
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to