added popular page component

This commit is contained in:
X4Lo committed 2024-03-31 04:14:03 +00:00
1 parent 2327a7a302
commit e43b9b58d1
4 files changed
+68

No files matched your search

Whitespace-only changes.
@@ -0,0 +1,29 @@
<!--breadcrumb-->
<div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
<div class="breadcrumb-title pe-3">Discover</div>
<div class="ps-3">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0 p-0">
<li class="breadcrumb-item">
<a href="javascript:;">
</a>
</li>
<li class="breadcrumb-item active" aria-current="page">Popular</li>
</ol>
</nav>
</div>
<div class="ms-auto">
<div class="btn-group">
<button type="button" class="btn btn-outline-dark" [class.active]="activeComponent === true"
(click)="showComponent(true)">Movies</button>
<button type="button" class="btn btn-outline-dark" [class.active]="activeComponent === false"
(click)="showComponent(false)">TV-Series</button>
</div>
</div>
</div>
<!--end breadcrumb-->
<app-entry-list *ngIf="activeComponent === true" [isMovies]="true" [type]="'popular'"></app-entry-list>
<app-entry-list *ngIf="activeComponent === false" [isMovies]="false" [type]="'popular'"></app-entry-list>
@@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PopularComponent } from './popular.component';
describe('PopularComponent', () => {
let component: PopularComponent;
let fixture: ComponentFixture<PopularComponent>;
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [PopularComponent]
});
fixture = TestBed.createComponent(PopularComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,18 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-popular',
templateUrl: './popular.component.html',
styleUrls: ['./popular.component.css'],
})
export class PopularComponent {
activeComponent: boolean = true;
showComponent(activeComponent: boolean) {
this.activeComponent = activeComponent;
}
getEndPoint(): string {
return '';
}
}