diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index fd6dfc8..568360a 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -13,7 +13,7 @@
- +

{{posts_list[0]?.categories}}

diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 7b90caa..aea2615 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -98,8 +98,7 @@ export class HomeComponent implements OnInit { this.tech_list = res.items; this.tech_list.forEach(elm => { var title = elm['title']; - var first = title.replace("'", "'"); - var second = first.replace("'", "'"); + var second = title.split("'").join("'"); elm['title'] = second; }); console.log("tech", res); diff --git a/src/app/post/post-list/post-list.component.ts b/src/app/post/post-list/post-list.component.ts index 275def0..56bfbb5 100644 --- a/src/app/post/post-list/post-list.component.ts +++ b/src/app/post/post-list/post-list.component.ts @@ -47,8 +47,7 @@ export class PostListComponent implements OnInit { this.posts_list = res.items; this.posts_list.forEach(elm => { var title = elm['title']; - var first = title.replace("'", "'"); - var second = first.replace("'", "'"); + var second =title.split("'").join("'"); elm['title'] = second; }); diff --git a/src/app/post/post-routing.module.ts b/src/app/post/post-routing.module.ts index 44cdd74..921bca8 100644 --- a/src/app/post/post-routing.module.ts +++ b/src/app/post/post-routing.module.ts @@ -6,7 +6,7 @@ import { SearchResultComponent } from './search-result/search-result.component'; const routes: Routes = [ { path: 'search/:keyword/:tag', component: SearchResultComponent }, - { path: ':title', component: PostListComponent } + { path: 'chu-de/:title', component: PostListComponent } ]; @NgModule({ diff --git a/src/app/shared/navbar/navbar.component.html b/src/app/shared/navbar/navbar.component.html index fdd426d..dc90a99 100644 --- a/src/app/shared/navbar/navbar.component.html +++ b/src/app/shared/navbar/navbar.component.html @@ -56,7 +56,7 @@ Tin nĂ³ng