Articles → ANGULAR.JS → Ng-Init Directive In Angular.JS

Ng-Init Directive In Angular.JS






Purpose





Sample Code




<div ng-app="" ng-init="name='sample name'">
	<p> Name:
		<input type="text" ng-model="name">
	</p>
	<p ng-bind="name"> </p>
</div>




Picture showing the output of ng-init directive in angular.js

Click to Enlarge




Posted By  -  Karan Gupta
 
Posted On  -  Thursday, May 14, 2015

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250