Last active
April 10, 2018 21:59
-
-
Save kmaraz/196eeb130178d926b478c1b87d2036f0 to your computer and use it in GitHub Desktop.
This file contains 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
// The original AngularJs application | |
const ngModule = angular.module('admin', [ | |
// We are leaving all the old module untouched | |
'ng1.modules', | |
// We can downgrade Components, Directives, Services, etc. | |
// And use them in the AngularJs app | |
'ng2.modules' | |
]); | |
@NgModule({ | |
imports: [ BrowserModule, UpgradeModule ] | |
}) | |
class AppModule { | |
constructor( | |
private upgrade: UpgradeModule, | |
private injector: Injector | |
) { } | |
ngDoBootstrap() { | |
// Bootstrap main app | |
this.upgrade.bootstrap(document.body, ['admin']); | |
} | |
} | |
platformBrowserDynamic().bootstrapModule(AppModule); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment