Angular init Directive
As from last 2 chapters we got that AngularJS directives are HTML attributes with an ng prefix. Now comes to ng-init directive it is used to initialies AngularJS application variables. As per the given below images:-
We can also use some alternative for ng-init as given in below image
We can use data-ng-, instead of ng-, if you want to make your page HTML valid. | |