Environment flags not working
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.
- Create a new project through ng new and install dependencies
- Import environments/environment in app.component
- Add some conditional behavior depending on the environment
- 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.
@filipesilva should I open a new bug report for this or should this one be re-opened?
@chadbr can you provide a reproduction I can follow to see it not working please? Happy to reopen then.
same issue ("@angular/cli": "1.4.9"),.....and the bug is listed as closed?
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 .
it seems broken again with Angular CLI: 1.7.4 on Mac, but it works on linux.
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.