How can I dynamically add a directive in AngularJS?

Posted by Jessica Taylor | Updated on

In this example, how can you dynamically add a directive in AngularJS? You have a lot of pointless jQuery in there, but the $compile service is actually super simple in this case:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers