refactor(compiler): make PLATFORM_PIPES
/ PLATFORM_DIRECTIVES
an option on CompilerConfig
This aligns the configuration of platform pipes / directives with offline compilation. BREAKING CHANGE: - `PLATFORM_PIPES` and `PLATFORM_DIRECTIVES` now are fields on `CompilerConfig`. Instead of providing a binding to these tokens, provide a binding for `CompilerConfig` instead.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import {ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {unimplemented} from '../src/facade/exceptions';
|
||||
import {isBlank} from '../src/facade/lang';
|
||||
import {Type, isBlank} from '../src/facade/lang';
|
||||
|
||||
import {CompileIdentifierMetadata} from './compile_metadata';
|
||||
import {Identifiers} from './identifiers';
|
||||
@ -12,7 +12,8 @@ export class CompilerConfig {
|
||||
|
||||
constructor(
|
||||
public genDebugInfo: boolean, public logBindingUpdate: boolean, public useJit: boolean,
|
||||
renderTypes: RenderTypes = null, defaultEncapsulation: ViewEncapsulation = null) {
|
||||
renderTypes: RenderTypes = null, defaultEncapsulation: ViewEncapsulation = null,
|
||||
public platformDirectives: any[] = [], public platformPipes: any[] = []) {
|
||||
if (isBlank(renderTypes)) {
|
||||
renderTypes = new DefaultRenderTypes();
|
||||
}
|
||||
|
Reference in New Issue
Block a user