Display different banner based on NODE_ENV

7 views
Skip to first unread message

Tito

unread,
Jun 22, 2018, 2:05:12 PM6/22/18
to Angular and AngularJS discussion
Greetings,

I would like to make sure users are not using qatest environment thinking it is production site.
How could i leverage NODE_ENV to chaneg banner of index.html or some other way to inform user
THIS IS QA TEST

Thanks!

Sander Elias

unread,
Jun 22, 2018, 2:32:29 PM6/22/18
to Angular and AngularJS discussion
Hi Tito,

environment variables are off little use in a web application. have a look at the CLI environment settings, you can take care of this in there.


regards
Sander

Tito

unread,
Jun 22, 2018, 5:08:35 PM6/22/18
to Angular and AngularJS discussion
Hello Sander!

I have not migrated to new angular still stuck in angularjs.
Would you recomment .env file or? I could also use an api endpoint api/getEnviron

Thanks

Sander Elias

unread,
Jun 23, 2018, 12:06:21 AM6/23/18
to Angular and AngularJS discussion
Hi Tito,

In that case, an endpoint is the most stable solution.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages