4

I am trying to add dynamic html to my code using below lines

var el = $compile('<a ng-controller=\"tableController\" ng-click=\"open\">...ReadMore</a>')($scope);

However it is producing the below error enter image description here

Can anyone help?

neehu
  • 122
  • 9

1 Answers1

1

You missed the parentheses of the open method, The following code should be work.

var el = $compile('<a ng-controller=\"tableController\" ng click=\"open()\">...ReadMore</a>')($scope);
Shohel
  • 3,886
  • 4
  • 38
  • 75