Binding A Single Directive To Multiple Priorities On The Same Element In AngularJS

added by JavaScript Kicks
11/6/2014 3:55:49 PM

148 Views

Last night, I was looking through the AngularJS source code when I noticed that the ngInclude directive was defined twice. At first, I had no idea what to make of this craziness; but then, I realized that each version of the directive was given a different priority. I had no idea that this was possible in AngularJS - giving a single directive different priorities; but, upon further investigation, it totally works!


0 comments