angularjs - How to bind variable when calling directive using element.addClass -


i calling directive adding class element , compiling element eg

var el = angular.element(document.queryselector(".ctrl-outer-container")); el.addclass('directive-name); $compile(el)(scope); 

while calling directive way how can bind variable passing directive (2 way binding)

i tried

el.attr('attr-name', attr.value) 


Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -