The ngInit directive allows you to evaluate an expression in the current scope.
ngInit is for aliasing special properties of ngRepeat, as seen in the demo below. Besides this case, you should use controllers rather than ngInit to initialize values on a scope. ngInit along with $filter, make sure you have parenthesis for correct precedence: <ANY ng-init=""> ... </ANY>
<ANY class="ng-init: ;"> ... </ANY>
| Param | Type | Details |
|---|---|---|
| ngInit | expression | Expression to eval. |
© 2010–2016 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.2.32/docs/api/ng/directive/ngInit