How can I use the ng-non-bindable directive in an Ionic 2 app?

I’m trying to write text which includes single and double braces inside a <p> tag. I’ve tried modifying it to <p ng-non-bindable> but the angular compiler still picks up the braces.

Thanks for all the help!

Kebab case generally doesn’t work in Angular2. Have you tried ngNonBindable?

Yes, unfortunately no luck with that either.

However, I was able to inject the text from an array in my page’s ts file which worked very well.

It’s strange though, the autocomplete on Visual Studio Code gives me ng-non-bindable="". If that’s right, I didn’t know that directive could take an argument.

That’s all well and good but I’m wondering why the directive didn’t work. I’m new to Angular and TS so is there a module I should be importing for this to work or…?

Thanks.

Something else is going on. I just dropped this into my scratchbox’s home page:

<div ngNonBindable>{{foo}}</div>

and it renders as “{{foo}}” as expected.