AngularJS Directives
AngularJS Directives
AngularJS allows you to extend the HTML attributes with the new directives. AngularJShas built-in policy structure that offers functionality for applications.AngularJS It is also possible to allow you to set your own directives.AngularJS allows you to extend HTML with new attributes called directives.
AngularJS has incorporated in the set of directives that offers functionality to your application.
AngularJS also allows you to determine your own directives.
AngularJS Directives:
AngularJS directives extend attributes and ng- HTML prefix.
The ng application directive initializes an application AngularJS.
The init directive initializes ng data applications.
Example
<div ng-app="" ng-init="firstName='John'"><p>Name: <input type="text" ng-model="firstName"></p>
<p>You wrote: {{ firstName }}</p></div>
The ng-model directive binds the HTML controls (input, select, text area) for data applications.
Read about all the directives in AngularJS AngularJS our Reference Directive.
The union data
Data Binding:
The {{firstName}} expression, in the previous example, AngularJS data link expressions.
Data collected in AngularJS AngularJS binding expression data with AngularJS.
{{}} FirstName have joined with ng-model = "Name".
In the first two examples of the text field are linked with two ng-model directives:
Example
<div ng-app="" ng-init="quantity=1;price=5">
Quantity: <input type="number" ng-model="quantity">
Costs: <input type="number" ng-model="price">
Total in dollar: {{
quantity * price }}
</div>
The ng application directive:
The application ng directive defines the root element of an application AngularJS.
The ng-application directive automatically bootstraps (initializes automatically) application when loading a web page.
The init ng directive
The init ng directive defines the value of the initial request of an AngularJS.
Usually, you will not init-ng. Who will use the driver or module instead?
You will learn more about the drivers and the modules later.
The ng-model Directive
The ng-model directive binds the HTML controls (input, select, text area) for data applications.
The ng-model directive can also:
• Provide validation for the data type of the application (number, email, is necessary).
• Provide a status for data applications (legal, dirty, flashy, error).
• Provide a CSS class for the HTML element.
• HTML elements together in an HTML form.
Read more about the ng-model directive in the next chapter.
Create new directives
In addition to all the built-in AngularJS directives, you can make your own directives.
New guidelines formulated by the use of the .directive function.
They are used in the new directive, so the HTML tag with the same name as the new directive.
If the directive name, you should use the name of the camels, w3TestDirective, but if you claim it, you have to make a name Separate, w3-test Directive:
Example
<body ng-app="myApp">
<w3-test-directive></w3-test-directive>
<script>
var app = angular.module("myApp", []);
app.directive("w3TestDirective", function()
{
return
}</script>
</body>
Restrictions
You can restrict your directives can only be invoked by several methods.
The legal limit value is:
• E is the name of the element
• One of the attributes
• Class C a
• M for Comment
The standard value is EA, it is both the name of the element and attribute names can be used in the Directive.
To getting expect level training for AngularJS training in your Location - AngularJS training in Chennai | AngularJS training in Bangalore | AngularJS training Pune | Microsoft Azure training in Chennai | AngularJS 2 training in Chennai | AngularJS 5 training in Chennai
Very good to read this post
ReplyDeletebest azure certification training in chennai
thanks for sharing this informations
ReplyDeleteaws training center in chennai
aws training in chennai
aws training institute in chennai
best angularjs training in chennai
angular js training in sholinganallur
angularjs training in chennai
azure training in chennai
thanks for that web design company in
ReplyDeletevelachery
web design company in velachery
ReplyDeletehttp://angularjscoursesinstitute.blogspot.com/2018/09/angularjs-directives.html
ReplyDeleteI believe there are many more pleasurable opportunities ahead for individuals that looked at your site.MCSE Training in Chennai
ReplyDeleteAI Training in Chennai
SEO Training in Chennai
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.Dotnet Training in Chennai
ReplyDeleteMatlab Training in Chennai
Embedded Training in Chennai
SAS Training in Chennai
You can download educational websites templates on TemplateMonster. Visit it right now!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWhen it comes to handling your website and development issues, there are several advantages to hiring a web design company to consider
ReplyDeleteC and C++ Training Institute in chennai | C and C++ Training Institute in anna nagar | C and C++ Training Institute in omr | C and C++ Training Institute in porur | C and C++ Training Institute in tambaram | C and C++ Training Institute in velachery
AngularJS allows you to extend the HTML attributes with the new directives. Very clearly explained with Examples.
ReplyDeleteThanks for sharing an informative blog; I really enjoyed reading your well written articles.
Lube Oil Blending Plant, Lube Oil and Grease Filling Line