2 |
31 |
32 | {{ post.body }}
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/frontend/src/app/components/post-detail/post-detail.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { ActivatedRoute } from '@angular/router';
3 | import { Post } from '../../models/post';
4 | import { BlogService } from '../../services/blog.service';
5 |
6 | @Component({
7 | selector: 'app-post-detail',
8 | templateUrl: './post-detail.component.html',
9 | styleUrls: ['./post-detail.component.css']
10 | })
11 | export class PostDetailComponent implements OnInit {
12 |
13 | public post: Post | null = null;
14 |
15 | constructor(private route: ActivatedRoute, private blog: BlogService) { }
16 |
17 | async ngOnInit(): Promise