Modern Angular apps boot with bootstrapApplication(RootComponent, { providers: [...] })—no root AppModule required. This playground’s mountApp(Component) calls the same API against selector app-root.
Providers at bootstrap
provideRouter(routes)— enable navigationprovideHttpClient()— HTTP client with interceptors- App-wide tokens for config, logging, or feature flags
Standalone root component
Set standalone: true on the root component and list imports (e.g. RouterOutlet, CommonModule) directly.
Important interview questions and answers
- Q: bootstrapApplication vs NgModule bootstrap?
A: Standalone bootstrap registers providers and a root component without declaring an NgModule shell. - Q: What does mountApp do here?
A: WrapsbootstrapApplicationso lessons render into the iframe’s<app-root>.
Self-check
- Which selector does the playground expect on the root component?
- Name two providers you would add for a routed SPA.