Skip to content

Commit

Permalink
chore: change readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerkay committed Nov 9, 2020
1 parent 966fe6d commit 1eae06e
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<app1-root class="app1-root"></app1-root>`,
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;
});
}
});
```

Expand Down

0 comments on commit 1eae06e

Please sign in to comment.