Dynamic Controllers in Directives with the undocumented

added by JavaScript Kicks
12/10/2015 5:50:55 PM

731 Views

Assigning Controllers to Angular Directives is the norm when building out components. But what if you wanted to dynamically assign a Controller to the same Directive and template? There are reasons for using this technique (though uncommon), and the undocumented name property bound to each Directive's definition Object can allow us to do exactly that.


0 comments