I'm trying to do something similar to this interpolateProvider
in AngularJS 2
but can not find how to do this similarly
AngularJS 1.x https://docs.angularjs.org/api/ng/provider/$interpolateProvider
$interpolateProvider.startSymbol('//');
$interpolateProvider.endSymbol('//');
checking documentation forAngularJS 2
can not find anything about this. sorry for my English
It is available from angular 2.0.0-rc2 if I'm not mistaken, at least in current rc4 for sure. It is no longer global setting, but per-component metadata property.
@Component({
selector: "my-comp",
templateUrl: "some/url/some-file.html",
...,
interpolation: ["{:!", "!:}"]
})
...
And in component's template some/url/some-file.html
you can use those delimiters:
<div>{:!myExpression!:}</div>
BTW - thank you for the interesting question, I've found couple problems in my current project while I was trying to get an answer for you. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With