InterpolateProvider in angularjs 2

前端 未结 1 1237
灰色年华
灰色年华 2020-12-20 03:12

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

$interpolateProvider.startSymbo         


        
相关标签:
1条回答
  • 2020-12-20 04:01

    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

    0 讨论(0)
提交回复
热议问题