diff --git a/README.md b/README.md index 4b911c6..a08448f 100644 --- a/README.md +++ b/README.md @@ -141,21 +141,28 @@ export class AppComponent implements OnInit { ### 3. Sub App define how to bootstrap AppModule ``` -defineApplication('app1', (portalApp: PlanetPortalApplication) => { - return platformBrowserDynamic([ - { - provide: PlanetPortalApplication, - useValue: portalApp - } - ]) - .bootstrapModule(AppModule) - .then(appModule => { - return appModule; - }) - .catch(error => { - console.error(error); - return null; - }); +defineApplication('app1', { + template: ``, + bootstrap: (portalApp: PlanetPortalApplication) => { + return platformBrowserDynamic([ + { + provide: PlanetPortalApplication, + useValue: portalApp + }, + { + provide: AppRootContext, + useValue: portalApp.data.appRootContext + } + ]) + .bootstrapModule(AppModule) + .then(appModule => { + return appModule; + }) + .catch(error => { + console.error(error); + return null; + }); + } }); ```