lacolaco / ng-dynamic

dynamic contents projection in Angular

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work when template contains a {

ssougnez opened this issue · comments

Hi,

say you retrieve content from a web service and in this content, you have "{" character. ng-dynamic will try to compile it but the compiler will think that you're trying to interpolate something and will fail. I implemented a similar component and made it work by adding this:

this.content = this.content.replace(/{/g, "{{ '{' }}");

This allows to espace the opening curly braces, and then everything works.