suppose i have two button and when we click on button 1 then show function
call in controller and same way when we click on button 2 then hide
function call in controller.
from show function how could i dynamically load and add directive in page
and as well as how could i hide or remove directive from page when hide
function will be called.
hence i am new in angular so not sure the below code will add directive at
run time if i call it from show function ?
$('body').append($compile("<my-angular-directive />")(scope));
scope.$apply();
i do not know how to remove directive from page if it exist in page from
controller function. give me suggestion how to achieve this. thanks
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.