1

I am calling directive adding a class to element and compiling element eg

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

while calling directive this way How can I bind variable that I am passing to directive (2 way binding)

I tried with

el.attr('attr-name', attr.value)
Naushad Ahmad
  • 476
  • 5
  • 22

0 Answers0