Reputation: 132
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
Can anyone help?
Upvotes: 4
Views: 54
Reputation: 3934
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);
Upvotes: 1