Base solution for your next web application
Open Closed

appconfig.json per environment #11102


User avatar
0
henryand created

we are using ANZ 10.1 Angular/Core combined

When i publish, i need to go into Filezilla to delete the angular appconfig.json and replace it with the appropriate appconfig.environment.json otherwise it still tries touse localhost on our published sites instead of our hosted domain

i have set the ASPNETCORE_ENVIRONMENT for each environment. i thought that was supposed to be sufficient for Angular to look at the correct json file

What is the correct process for having Angular get the correct remoteServiceBaseUrl and appBaseUrl for the deployment slot?

thanks, Rocco


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @henryand

    On Angular side, it is managed differently. You need to specify the environment while publishing your angular app. By default appconfig.Production.json file will be used. Something like this;

    ng build --configuration=staging