AngularJS

Directive Priority in AngularJS

Recently I discovered that every directive in AngularJS has a priority score assigned to it. While the page is loaded the priority plays a very important role in setting the order of the execution of various directives in single DOM Element. The priority is used to sort the directives before their "compile" function gets called. In simple...

by Gaurav Sharma
Tag: directives
28-May-2015

Technology

Explicitly providing ng-model to DOM elements

In AngularJS, we can easily write our own custom directives to achieve required functionality. There are certain attributes which we provide in directive definition like restrict , scope , template, link, transclude etc. There is one more attribute named : require , which gives us the liberty to include another directive and inject...

by Sakshi Tyagi
Tag: directives
28-Jul-2014

Technology

Demystifying Transclusion

Wait, Trans .. what? Yes, Transclusion is the mysterious, big and most intimidating of words when writing AngularJS Components. AngularJS, being so powerful and all provides a lot of ways to do many things. Now writing directives is not a very complex exercise, infact it is quite simple now if you first have a look at the...

by Manoj Nama
Tag: directives
13-Jul-2014

AngularJS, Front End Development

AngularJS : Getting started with Directives

In this post we will go through an important aspect of AngularJS i.e., Directives. Directives helps us do things in a better and cleaner way. Lets get into the code rather going into theoretical explanations, which will make it more clear what actually directives do. We have written a simple directive below which shows some HTML when...

by Suroor Wijdan
Tag: directives
25-Apr-2013