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

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 v6), and now I am trying to serve the app via

ng serve --env=local

But this gives me error:

Unknown option: ‘–env’

I use multiple environments (dev/local/prod), and this is the way it was working in Angular 5.2. How can I set the environment now in Angular 6?

8 Answers
8

Leave a Comment