AngularJS ng-init DirectiveThe AngularJS ng-init directive facilitates you to evaluate the given expression in the current scope. Ng-controller is preferred over ng-init because the ng-init directive can add some unnecessary logic into the scope. It is supported by all HTML elements. Syntax: Parameter explanation: expression: It specifies an expression to evaluate. Let's take an example to demonstrate ng-init directive. See this example: Test it Now
Next TopicAngularJS ng-jq Directive
|