Hata Ansiklopedisi

Eksik Platform

Angular, bir platformun başlatılmasını gerektirir. Bu hata, bootstrapApplication sunucuda bir BootstrapContext sağlanmadan kullanıldığında fırlatılır.

Sunucu tarafı oluşturma kullanılırken, bootstrapApplication bir BootstrapContext'in argüman olarak iletilmesini gerektirir.

Hatayı ayıklama

Bu hatayı çözmek için main.server.ts dosyanızın bootstrapApplication fonksiyonuna doğru şekilde bir BootstrapContext ilettiğinden emin olun.

import {bootstrapApplication, BootstrapContext} from '@angular/platform-browser';
import {App} from './app/app';
import {config} from './app/app.config.server';

const bootstrap = (context: BootstrapContext) => bootstrapApplication(App, config, context);
export default bootstrap;