Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Angular: Environments.ts fehlt

02.02.2023 (👁2071)

Angular: Environments.ts fehlt

Problem Angular:

Beim Erstellen der Angular Anwendung fehlt die environments.ts datei.

Ein Bild, das Text, Screenshot, Bildschirm enthÀlt.

Automatisch generierte Beschreibung

Lösung:

ng g environments

Mit dem Befehl ng g environments werden die Dateien erstellt

Ein Bild, das Text, Screenshot, Monitor, computer enthÀlt.

Automatisch generierte Beschreibung

Ordner

Ein Bild, das Text enthÀlt.

Automatisch generierte Beschreibung 

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"

  };