Revert "feat(change_detection): make INTERPOLATE_REGEXP customizable (#7417)"

This reverts commit c3fafa0651.

The symbols should be configured at the component level and not be global to the compiler.
This commit is contained in:
Victor Berchet
2016-06-01 17:31:35 -07:00
parent 04220be8fd
commit 1a386a58c8
10 changed files with 20 additions and 43 deletions

View File

@ -6,20 +6,15 @@ import {ViewEncapsulation} from '@angular/core';
export class CompilerConfig {
public renderTypes: RenderTypes;
public interpolateRegexp: RegExp;
public defaultEncapsulation: ViewEncapsulation;
constructor(public genDebugInfo: boolean, public logBindingUpdate: boolean,
public useJit: boolean, renderTypes: RenderTypes = null,
interpolateRegexp: RegExp = null, defaultEncapsulation: ViewEncapsulation = null) {
public useJit: boolean, renderTypes: RenderTypes = null,
defaultEncapsulation: ViewEncapsulation = null) {
if (isBlank(renderTypes)) {
renderTypes = new DefaultRenderTypes();
}
this.renderTypes = renderTypes;
if (isBlank(interpolateRegexp)) {
interpolateRegexp = DEFAULT_INTERPOLATE_REGEXP;
}
this.interpolateRegexp = interpolateRegexp;
if (isBlank(defaultEncapsulation)) {
defaultEncapsulation = ViewEncapsulation.Emulated;
}
@ -49,8 +44,3 @@ export class DefaultRenderTypes implements RenderTypes {
renderNode = null;
renderEvent = null;
}
/**
* A regexp pattern used to interpolate in default.
*/
export var DEFAULT_INTERPOLATE_REGEXP = /\{\{([\s\S]*?)\}\}/g;