Created
March 5, 2019 12:25
-
-
Save kmaraz/6650c22a44732f7f266a8be765e09850 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MUST BE IN THIS ORDER! | |
import 'core-js/es7/reflect'; | |
import 'zone.js/dist/zone'; | |
import { enableProdMode, NgModule } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { UpgradeModule } from '@angular/upgrade/static'; | |
import * as angular from 'angular'; | |
// AngularJs app | |
angular.module('admin', [ | |
'ng2.modules' | |
]); | |
if (!ON_DEVELOPMENT) { | |
enableProdMode(); | |
} | |
@NgModule({ | |
imports: [ | |
BrowserModule, | |
UpgradeModule | |
] | |
}) | |
export class AppModule { | |
constructor( | |
private upgrade: UpgradeModule | |
) { } | |
ngDoBootstrap() { | |
// Bootstrap main app | |
this.upgrade.bootstrap(document.body, ['admin']); | |
} | |
} | |
if (ON_DEVELOPMENT) { | |
platformBrowserDynamic().bootstrapModule(AppModule); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment