× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS
Paul Barry
Feb 27, 2015
<p>It was discovered that an AngularJS Directive which is loading a template via a templateUrl callback function gets resolved <em>before</em> the compile function fires. We were attempting to load a template using an attribute value on the directive itself as the template path when we discovered that the value wasn't being compiled first, causing the template URL to be <em>{{object.property}}.html</em> instead of the compiled value of the property.</p> <p>To resolve this, we created a generic template, in which we then used ngInclude to load a dynamic template. This worked great and solved the problem.</p>
comments powered by Disqus