Angularjs Classroom
shubham rauthan /
Professional /
Web Technology
AngularJS directives are extended HTML attributes with the prefix ng-
.
The ng-app
directive initializes an AngularJS application.
The ng-init
directive initializes application data.
The ng-model
directive binds the value of HTML controls (input, select, textarea) to application data.
AngularJS Directives The AngularJS framework can be divided into three major parts:
- ng-app : This directive defines and links an AngularJS application to HTML.
- ng-model : This directive binds the values of AngularJS application data to HTML input controls.
- ng-bind : This directive binds the AngularJS application data to HTML tags.
Example
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="" ng-init="firstName='John'">
<p>Input something in the input box:</p>
<p>Name: <input type="text" ng-model="firstName"></p>
<p>You wrote: {{ firstName }}</p>
</div>
</body>
</html>
Out Put
Input something in the input box:
Name:
Jon |
You wrote: John
shubham rauthan
Skills Angularjs
Qualifications :-Location :-dehradun,dehradun,uttarakhand,India
Description:-
I am a b.tech graduate in Information Technology and working as a Software Engineer and i would like to learn new technologies and up to date with the trending technologies in I.T. fields
Explore