When Do You Need To Compile A Directive In AngularJS

added by JavaScript Kicks
3/4/2015 10:12:46 PM

1017 Views

On the most recent episode of Adventures in Angular, on Advanced Directives, Ward Bell and Joe Eames posed a very provocative question - When do you actually need to use the compile phase of an AngularJS directive? It used to be that you needed the compile in order to access the transclude function; but, as of AngularJS 1.2 that's no longer the case (the transclude function is now exposed in the linking phase). As such, does the compile step still have a purpose?


0 comments