Progress so far for AOT

This commit is contained in:
Alicia Sykes
2017-12-29 23:31:57 +00:00
parent 6553a8fa27
commit 6890b3c9a9
3 changed files with 9 additions and 7 deletions

View File

@@ -46,6 +46,10 @@ export class RollbarErrorHandler implements ErrorHandler {
}
}
export function userFactory() {
return new Rollbar(rollbarConfig)
}
@NgModule({
imports: [
BrowserModule,
@@ -80,9 +84,7 @@ export class RollbarErrorHandler implements ErrorHandler {
CommonService,
{ provide: ErrorHandler, useClass: RollbarErrorHandler },
{ provide: Rollbar,
useFactory: () => {
return new Rollbar(rollbarConfig)
}
useFactory: userFactory
}
],
bootstrap: [

View File

@@ -1,5 +1,5 @@
// import { platformBrowser } from '@angular/platform-browser';
//
// import { AppModuleNgFactory } from './app.module';
// import { AppModuleNgFactory } from './../dist/app.module';
//
// platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

View File

@@ -15,12 +15,12 @@
},
"files": [
"src/app/app.module.ts",
"src/main.ts"
"client/dev/app.module.ts",
"client/dev/main-aot.ts"
],
"angularCompilerOptions": {
"genDir": "aot",
"genDir": "client/dist",
"skipMetadataEmit" : true
}
}