From 1eae06ea77ccc42f944ecd711a77d7adecf1a380 Mon Sep 17 00:00:00 2001 From: walkekay Date: Mon, 9 Nov 2020 17:47:33 +0800 Subject: [PATCH] chore: change readme.md --- README.md | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) 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; + }); + } }); ```