Updated article service methods and admin dashboard
This commit is contained in:
1 parent
6204e1d53d
commit
5091aadcea
3 files changed
+6
-1
No files matched your search
@@ -104,6 +104,7 @@ textarea {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.articles-list-tile li:last-child {
|
.articles-list-tile li:last-child {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="!noArticles">
|
<div *ngIf="!noArticles">
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let article of articles">
|
<li *ngFor="let article of articles" (click)="navigateToArticle(article.slug)">
|
||||||
<strong>ID {{ article.id }}</strong> - {{ article.title }}
|
<strong>ID {{ article.id }}</strong> - {{ article.title }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -147,6 +147,10 @@ export class AdminComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
navigateToArticle(slug: string): void {
|
||||||
|
this.router.navigate([`/blog/${slug}`]);
|
||||||
|
}
|
||||||
|
|
||||||
loadArticles(): void {
|
loadArticles(): void {
|
||||||
const articleObserver: Observer<any> = {
|
const articleObserver: Observer<any> = {
|
||||||
next: (data) => {
|
next: (data) => {
|
||||||
|
|||||||
Reference in new issue
Block a user