AngularJS Custom Directives example – Angular Directives

Rate this post

AngularJS Custom Directives example – Angular Directives

An Introduction to the AngularJS Directive

simple Custom directives define are used in AngularJS to simple extend the new functionality of HTML Browser side scripts.and Custom directives means html extends Dom uses are defined using simple “directive” function or methods.AngularJS – Custom Directives

Directives are Simple markers on a HTML DOM element

Like as
-an attribute,
-element name,
-comment
-CSS class

Angular Directives : Defining a Directive

script.js
[php]
var infinityknow = angular.module(‘infinityknow’, []);

Now, define a directive.

infinityknow.directive(‘myDirective’, function() {
return {
restrict: ‘E’,
template: ‘

I made a directive!


};
});
[/php]

HTML
[php]



[/php]

READ :  AngularJS Send authentication token http header

custom directive in angularjs With Example

[php]


AngularJS Custom Directives example – Angular Directives

AngularJS Sample Application




[/php]

Example

Leave a Reply

Your email address will not be published.