angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Environment flags not working

Open VictorJuliani opened this issue 9 years ago • 26 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.2.4
node: 6.10.3
os: win32 x64
@angular/animations: 4.3.1
@angular/common: 4.3.1
@angular/compiler: 4.3.1
@angular/core: 4.3.1
@angular/forms: 4.3.1
@angular/http: 4.3.1
@angular/platform-browser: 4.3.1
@angular/platform-browser-dynamic: 4.3.1
@angular/router: 4.3.1
@angular/cli: 1.2.4
@angular/compiler-cli: 4.3.1
@angular/language-service: 4.3.1

Repro steps.

  1. Create a new project through ng new and install dependencies
  2. Import environments/environment in app.component
  3. Add some conditional behavior depending on the environment
  4. Serve the project with env attribute (tried all these)
ng serve --e=prod --env=prod -e=prod -env=prod --environment=prod -environment=pro
d

Desired functionality.

It should import the correct environment properties accordingly to the flag used.

Mention any other details that might be useful.

It stopped working after a yarn upgrade ran on my project and then I tested with a fresh new project generated by the cli.

VictorJuliani avatar Jul 25 '17 17:07 VictorJuliani

@filipesilva should I open a new bug report for this or should this one be re-opened?

chadbr avatar Nov 27 '17 17:11 chadbr

@chadbr can you provide a reproduction I can follow to see it not working please? Happy to reopen then.

filipesilva avatar Nov 30 '17 10:11 filipesilva

same issue ("@angular/cli": "1.4.9"),.....and the bug is listed as closed?

darincardin avatar Apr 12 '18 19:04 darincardin

Closed

Le jeu. 12 avr. 2018 à 15:04, Darin Cardin [email protected] a écrit :

same issue ("@angular/cli": "1.4.9"),.....and the bug is listed as closed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/7138#issuecomment-380911664, or mute the thread https://github.com/notifications/unsubscribe-auth/AUN9Jzsz9uFpsCcC_Ms24V57Knqr4FOAks5tn6UlgaJpZM4Oi2k0 .

AnthonyGiretti avatar Apr 12 '18 19:04 AnthonyGiretti

it seems broken again with Angular CLI: 1.7.4 on Mac, but it works on linux.

phra avatar May 01 '18 12:05 phra

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.