Services-Nucleus: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 3: | Zeile 3: | ||
= Links = | = Links = | ||
* [[Nucleus-Angular]] | * [[Nucleus-Angular]] | ||
= User-Service erstellen = | |||
<pre> | |||
cd /home/ws/angular/Nucleus | |||
mkdir -p src/app/users | |||
ng g service users/user-rest | |||
</pre> | |||
= REST-Service erstellen = | = REST-Service erstellen = | ||
<pre> | <pre> | ||
cd /home/ws/angular/Nucleus | |||
mkdir src/app/service | mkdir src/app/service | ||
ng g service service/rest | ng g service service/rest |
Aktuelle Version vom 17. Januar 2022, 13:58 Uhr
Links[Bearbeiten]
User-Service erstellen[Bearbeiten]
cd /home/ws/angular/Nucleus mkdir -p src/app/users ng g service users/user-rest
REST-Service erstellen[Bearbeiten]
cd /home/ws/angular/Nucleus mkdir src/app/service ng g service service/rest
- Service verwendet HttpClientModule, dieses importieren: app.module.ts:
... import { HttpClientModule } from '@angular/common/http'; ... imports[ HttpClientModule, ...