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? -

file - Python: AttributeError: 'str' object has no attribute 'readlines' -

c# - Get the Class name in a class with atribute inside a attribute method -