Skip to content

Commit 5e93ffa

Browse files
committed
fix: migrate new files
1 parent fa85847 commit 5e93ffa

File tree

1 file changed

+18
-0
lines changed
  • adev-ja/src/content/reference/errors

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Missing Platform
2+
3+
Angular requires a platform to be initialized. This error is thrown when `bootstrapApplication` is used on the server without providing a `BootstrapContext`.
4+
5+
When using server-side rendering, `bootstrapApplication` requires a `BootstrapContext` to be passed as an argument.
6+
7+
## Debugging the error
8+
9+
To resolve this error, ensure that your `main.server.ts` file correctly passes a `BootstrapContext` to the `bootstrapApplication` function.
10+
11+
```typescript
12+
import { bootstrapApplication, BootstrapContext } from '@angular/platform-browser';
13+
import { App } from './app/app';
14+
import { config } from './app/app.config.server';
15+
16+
const bootstrap = (context: BootstrapContext) => bootstrapApplication(App, config, context);
17+
export default bootstrap;
18+
```

0 commit comments

Comments
 (0)