ngInit
ng
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.
<ANY ng-init="{expression}"> ... </ANY>as class
<ANY class="ng-init: {expression};"> ... </ANY>
Param | Type | Details |
---|---|---|
ngInit | expression | Expression to eval. |