feat: getting details of manga
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<h1>It's home component</h1>
|
||||
@for (item of items; track $index) {
|
||||
<div class="card">
|
||||
<h1>{{ item.rus_name }}</h1>
|
||||
<img [src]="item.cover.thumbnail" [alt]="item.slug" />
|
||||
</div>
|
||||
}
|
||||
<div class="flex flex-col items-center">
|
||||
@for (item of items; track $index) {
|
||||
<button (click)="getDetails(item.slug)">
|
||||
<div class="card flex flex-col items-center">
|
||||
<h1>{{ item.rus_name }}</h1>
|
||||
<img [src]="item.cover.thumbnail" [alt]="item.slug" />
|
||||
</div>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,12 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
getDetails(slug_url: string) {
|
||||
this.searchService.getDetails(slug_url).subscribe((data) => {
|
||||
console.log(data);
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.subscription.unsubscribe();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user