Services-Nucleus

Aus Info-Theke
Zur Navigation springen Zur Suche springen


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,
    ...