简体   繁体   中英

Apply directive on click event in AngularJs

I want to apply one directive to DOM on click event, but I am not able to achieve same can someone point out to the mistake which I am making in fiddle.

Fiddle Link: http://jsfiddle.net/laxmisalunkhe/s0nx5Lpp/

Example: I have class editable which will be used to get all HTML elements with that class and apply another directive (ie tinymce). I have used combination of both JQuery and AngularJS but not able to figure out the solution. Can Anybody help me out?

Actually I don't only want to apply tinymce directive on button click there will be some more different directives those will also get applied on different DOM elements, so it's not specific to tinymce, still it will be very helpful if someone point out to specific solution for tinymce.

restrict: 'E',   //change the E to A, you use it as attribute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM