refactor(compiler): Change arguments of CompilerConfig to named arguments

BREAKIKNG CHANGE:
`CompilerConfig` used to take positional arguments and now takes named arguments.

Closes #9172
This commit is contained in:
Tobias Bosch
2016-06-13 10:06:40 -07:00
parent 1745366530
commit bc888bf3a1
15 changed files with 110 additions and 103 deletions

View File

@ -63,14 +63,13 @@ export const BROWSER_APP_PROVIDERS: Array<any /*Type | Provider | any[]*/> = [
Testability, EventManager, ELEMENT_PROBE_PROVIDERS
];
function _createCompilerConfig() {
return new CompilerConfig(
assertionsEnabled(), false, true, null, null, COMMON_DIRECTIVES, COMMON_PIPES);
}
export const BROWSER_APP_COMPILER_PROVIDERS: Array<any /*Type | Provider | any[]*/> = [
COMPILER_PROVIDERS,
{provide: CompilerConfig, useFactory: _createCompilerConfig, deps: []},
{
provide: CompilerConfig,
useValue:
new CompilerConfig({platformDirectives: COMMON_DIRECTIVES, platformPipes: COMMON_PIPES})
},
{provide: XHR, useClass: XHRImpl},
];