Answer the question
In order to leave comments, you need to log in
$compile not working after request?
function getTemplate(conf) {
var compileScope = $rootScope.$new();
angular.extend(compileScope, conf);
var element = $compile(angular.element(
'<div class="tooltip-chart">' +
'<p>{{from}} - {{to}}</p>' +
'<p ng-if="y">USD: <bold style="color: #000000">{{y}}</bold></p>' +
'<span ng-if="news">' +
'<hr>' +
'<p ng-repeat="item in news">{{item}}</p>' +
'<hr>' +
'<p>3 of {{length}}<a ui-sref="news">VIEW ALL</a></p>' +
'</span>' +
'</div>'
))(compileScope);
compileScope.$apply();
return element.html();
}
Answer the question
In order to leave comments, you need to log in
After the request for then, for some reason, it does not work and throws a trace at the moment compileScope.$apply();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question