我正在 Angular 5 中实现 Angular Universal Rendering,而在生产中 Angular Universal 在我可以轻松部署和运行的本地机器上工作。只需按照此说明链接,它就可以在本地机器上运行https://github.com/angular/angular-cli/wiki/stories-universal-rendering。但是当我开始在 Firebase 中部署 Angular Universal 时,它并没有意外地工作。我关注了这个链接,但信息较少。我需要一些关于如何在 Firebase 中部署 Angular Universal Rendering 的帮助。感谢您的帮助伙计们!谢谢你!
如何将 angular 4 通用应用程序部署到 Firebase
https://www.youtube.com/watch?v=gxCu5TEmxXE
file structure like this:
src/app/app.module.ts:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule.withServerTransition({appId: 'something-unique'})
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
src/app/app.server.module.ts:
import { NgModule } from '@angular/core';
import …Run Code Online (Sandbox Code Playgroud)