How to set up Angular cli + Angular universal?

前端 未结 3 1995
梦毁少年i
梦毁少年i 2020-12-05 08:41

Anyone have experience with installing angular universal with angular cli projects?

I tried to follow this guide:

https://universal.angular.io/quickstart/

3条回答
  •  长情又很酷
    2020-12-05 09:34

    You can use universal-cli from https://github.com/devCrossNet/angular-cli

    It is a fork from angular-cli but this work with angular universal.

    After you intalled with npm install -g universal-cli create a new project with

    ung new PROJECT_NAME --universal

    Then the project should be ready to serve with

    cd PROJECT_NAME ung serve

    I have not tested with a existing angular-cli project but maybe ung init --universal could help

提交回复
热议问题