Last change
on this file was 8423429, checked in by AngelNasev <angel.nasev@…>, 17 months ago |
Add backend and frontend projects
|
-
Property mode
set to
100644
|
File size:
522 bytes
|
Line | |
---|
1 | import { Injectable } from '@angular/core';
|
---|
2 | import {HttpClient} from "@angular/common/http";
|
---|
3 | import {Observable} from "rxjs";
|
---|
4 | import {StudentCourseInterface} from "./StudentCourseInterface";
|
---|
5 | import {SubjectInterface} from "./subjectInterface";
|
---|
6 |
|
---|
7 | @Injectable({
|
---|
8 | providedIn: 'root'
|
---|
9 | })
|
---|
10 | export class SubjectService {
|
---|
11 |
|
---|
12 | url = "http://localhost:8080/api/subjects/all"
|
---|
13 | constructor(private http: HttpClient) { }
|
---|
14 |
|
---|
15 | getAllSubjects(): Observable<SubjectInterface[]> {
|
---|
16 | return this.http.get<SubjectInterface[]>(this.url)
|
---|
17 | }
|
---|
18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.