2

I'm trying to do something similar to this interpolateProvider in AngularJS 2 but can not find how to do this similarly for

$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
Hemant
  • 31
  • 1

1 Answers1

2

You can pass a CompilerConfig to bootstrapModule where you can configure a regular expression that defines what characters are used for interpolation:

var INTERPOLATION_REGEXP = /\{\{([\s\S]*?)\}\}/g; // default

platformBrowserDynamic().bootstrapModule(AppModule, [
    {
        interpolationRegexp: INTERPOLATION_REGEXP
    }
]);

See also Angular2 setting view encapsulation globally

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567