AngularJS ng-init Directive Multiple Values Example

AngularJS ng-init Directive Multiple Values Example

In this Post We Will Explain About is AngularJs ng-init Directive with Multiple Values With Example and Demo. Create a simple variable when application initiating the application and The ng-init simple directive using Angularjs evaluates this HTML dom given expression(s).and Declare multiple values in ng-init my this post to Welcome on infinityknow.com,The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to create a simple AngularJS ng-init Directive Multiple Values Example

READ :  Vue js Simple CKEditor Instance Get textarea value

Syntax
[php]

[/php]

First of all simple you need to simple add an js using external Angular.js file content to your web-application, in External angularjs libs other words “angular.min.js”.

AngularJs ng-init Directive with Multiple Values

[php]


<br /> Simple Example AngularJs ng-init Directive with Multiple Values<br />


AngularJs simple ng-init Directive with Multiple Values Example

{{comment1}}, {{message2}}



[/php]

Use a simple ng-init function, al the way more readable:

Example 1: AngularJS ng-init Multiple Values Example
[php]
ng-init=”init()”
[/php]

Example 2: AngularJS ng-init Multiple Values Example
[php]
$scope.init = function() {
$scope.first = 1;
$scope.second = 2;
}
[/php]

Example : 3 AngularJS ng-init Multiple Values Example
[php]
ng-init=”first = 1; second = 2″
or
ng-init=” first=’live24u’; second=’mydata’ ”
[/php]

READ :  IPhone spying child and employee monitoring

Example

I hope you have Got What is Declare multiple values in ng-init Example And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.

Leave a Comment