Services-Nucleus: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 3: | Zeile 3: | ||
= Links = | = Links = | ||
* [[Nucleus-Angular]] | * [[Nucleus-Angular]] | ||
= User-Service erstellen = | |||
<pre> | |||
cd /home/ws/angular/Nucleus | |||
mkdir src/app/service | |||
ng g service service/user-service | |||
</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 |
Version vom 15. Dezember 2021, 08:39 Uhr
Links
User-Service erstellen
cd /home/ws/angular/Nucleus mkdir src/app/service ng g service service/user-service
REST-Service erstellen
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, ...