Advertisement
torokt21

Untitled

May 29th, 2023
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Injectable } from '@angular/core';
  2. import {HttpClient} from "@angular/common/http";
  3. import {Post} from "./_models/post";
  4.  
  5. @Injectable({
  6.   providedIn: 'root'
  7. })
  8. export class PostService {
  9.   backendUrl: string = 'https://localhost:7015';
  10.  
  11.   constructor(private http: HttpClient) {
  12.   }
  13.  
  14.   getPosts(subjectId: string): void {
  15.     return this.http.get<Post[]>('https://localhost:7015/api/PostsApi/Details/' + subjectId);
  16.   }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement