Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {Component, OnInit} from '@angular/core';
- import {Post} from "../../_models/post";
- import {PostService} from "../../post.service";
- @Component({
- selector: 'app-list-posts',
- templateUrl: './list-posts.component.html',
- styleUrls: ['./list-posts.component.scss']
- })
- export class ListPostsComponent implements OnInit{
- subjectId:string=''
- posts: Post[]
- constructor(private postService: PostService, posts:Post[], subjectId:string) {
- this.posts=[];
- }
- ngOnInit(): void {
- this.postService.getPosts(this.subjectId)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement