How to set environment via `ng serve` in Angular 6

后端 未结 7 2007
庸人自扰
庸人自扰 2020-11-30 18:52

I am trying to update my Angular 5.2 app to Angular 6. I successfully followed instructions in the Angular update guide (including the update of angular-cli to

7条回答
  •  有刺的猬
    2020-11-30 19:35

    Angular no longer supports --env instead you have to use

    ng serve -c dev
    

    for development environment and,

    ng serve -c prod 
    

    for production.

    NOTE: -c or --configuration

提交回复
热议问题