(appRef: ApplicationRef)
| 41 | export class AppModule implements DoBootstrap { |
| 42 | // #docregion componentSelector |
| 43 | ngDoBootstrap(appRef: ApplicationRef) { |
| 44 | this.fetchDataFromApi().then((componentName: string) => { |
| 45 | if (componentName === 'ComponentOne') { |
| 46 | appRef.bootstrap(ComponentOne); |
| 47 | } else { |
| 48 | appRef.bootstrap(ComponentTwo); |
| 49 | } |
| 50 | }); |
| 51 | } |
| 52 | // #enddocregion |
| 53 | |
| 54 | fetchDataFromApi(): Promise<string> { |
nothing calls this directly
no test coverage detected