ngInit is an AngularJS directive that allows you to evaluate an expression in the current scope.
From Angularjs documentation:
The ngInit directive allows you to evaluate an expression in the current scope.
The only appropriate use of ngInit is for aliasing special properties of ngRepeat. Besides this case, you should use controllers rather than ngInit to initialize values on a scope.