This line should actually read ($parent)...
var newElem = angular.element($compile(template)(scope.$parent));
On Thursday, September 25, 2014 11:34:16 AM UTC-7, p. stephen w wrote:
>
> ..or maybe I should say, interpolate values in a translation string, when
> compiling a template, from with in a directive.
>
> The locale file contains a key such as, "key":"{{compile.me}}".
>
> Then the following...
> var template = $templateCache.get(errorHtml);
> var newElem =
> angular.element($compile(template)(scope.$parent));
>
> elem.append(newElem);
>
> Is this even possible?
>
> SW
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.