From 9600a325482edadb225dc4336bd121050b94be88 Mon Sep 17 00:00:00 2001 From: lllpsi Date: Mon, 14 Aug 2017 22:37:24 -0400 Subject: [PATCH] Fixing for AOT --- lib/monaco-editor-loader/monaco-editor-loader.module.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/monaco-editor-loader/monaco-editor-loader.module.ts b/lib/monaco-editor-loader/monaco-editor-loader.module.ts index 0fc0d88..740a8a1 100644 --- a/lib/monaco-editor-loader/monaco-editor-loader.module.ts +++ b/lib/monaco-editor-loader/monaco-editor-loader.module.ts @@ -1,13 +1,16 @@ import { NgModule, NgZone } from '@angular/core'; import { MonacoEditorLoaderService } from './monaco-editor-loader.service'; + +export const factory = (ngZone: NgZone) => { + return new MonacoEditorLoaderService(ngZone); +}; + @NgModule({ providers: [ { provide: MonacoEditorLoaderService, deps: [NgZone], - useFactory: (ngZone: NgZone) => { - return new MonacoEditorLoaderService(ngZone); - } + useFactory: factory } ] })