Angular: Environments.ts fehlt
Problem Angular:
Beim Erstellen der Angular Anwendung fehlt die environments.ts datei.
Lösung:
ng g environments |
Mit dem Befehl ng g environments werden die Dateien erstellt
Ordner
Environment.ts
// This file can be replaced during build by using the `fileReplacements` array. // `ng build` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`.
export const environment = { production: false };
|
Environment.prod.ts
export const environment = { production: true }; |
URL eintragen in Environtment.ts
Die URL ergÀnzt man dann in der environment datei
export const environment = { production: false, apiUrl:"https://localhost:7073/api/Articles" }; |