javascript - How to wrap compiled element around directive? -


i initiating simple directive link function:

...  function linkfn(scope, element) {    var wrapperel = angular.element('<div data-ng-click="togglezoom()"></div>');     scope.togglezoom = function() {...};     element.wrap(wrapperel); }  ... 

i tried replace wrapper compiled 1 var compiledwrapperel = $compile(wrapperel)(scope);, did not solve problem.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -