Reputation: 3707
I have an issue with AngularJS compile service. I am working out of angular but I can not compile my template, (I either try with a controller but I do not know why it does not work).
Due to specific development I can not use directives nor controllers.
Here is a Plunker of my issue: http://plnkr.co/edit/u9nfopTiikxjXmwzOgqh?p=preview
PS: This is a simple example, but I really need the compile service ($interpolate does not feet my needs)
Upvotes: 3
Views: 1400
Reputation: 20348
It works! Just call scope.$apply()
. Btw. if you be calling result.html()
you are appending the copy of html
that is not bound any more to the scope
. If you just append result
, the magic happens... Look at the PLNKR.
Upvotes: 3