Services-Nucleus

Aus Info-Theke
Zur Navigation springen Zur Suche springen


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