Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Injectable } from '@angular/core';
- import {HttpClient} from "@angular/common/http";
- import {Post} from "./_models/post";
- @Injectable({
- providedIn: 'root'
- })
- export class PostService {
- backendUrl: string = 'https://localhost:7015';
- constructor(private http: HttpClient) {
- }
- getPosts(subjectId: string): void {
- return this.http.get<Post[]>('https://localhost:7015/api/PostsApi/Details/' + subjectId);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement