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

后端 未结 7 2140
庸人自扰
庸人自扰 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条回答
  •  萌比男神i
    2020-11-30 19:43

    For Angular 2 - 5 refer the article Multiple Environment in angular

    For Angular 6 use ng serve --configuration=dev

    Note: Refer the same article for angular 6 as well. But wherever you find --env instead use --configuration. That's works well for angular 6.

提交回复
热议问题