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;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 25px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.articles-list-tile li:last-child {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div *ngIf="!noArticles">
|
||||
<ul>
|
||||
<li *ngFor="let article of articles">
|
||||
<li *ngFor="let article of articles" (click)="navigateToArticle(article.slug)">
|
||||
<strong>ID {{ article.id }}</strong> - {{ article.title }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -147,6 +147,10 @@ export class AdminComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
navigateToArticle(slug: string): void {
|
||||
this.router.navigate([`/blog/${slug}`]);
|
||||
}
|
||||
|
||||
loadArticles(): void {
|
||||
const articleObserver: Observer<any> = {
|
||||
next: (data) => {
|
||||
|
||||
Reference in new issue
Block a user