Commit fb320067 authored by jakkree kongpha's avatar jakkree kongpha

add detail anime

parent 164e2e94
......@@ -5,6 +5,7 @@ import { AuthGuard } from './shared/guards';
import { HomeComponent } from './home/home.component';
import { ManageanimeComponent } from './manageanime/manageanime.component';
import { CreatAnimeComponent } from './creat-anime/creat-anime.component';
import { DetailAnimeComponent } from './detail-anime/detail-anime.component';
const routes: Routes = [
{
......@@ -22,6 +23,10 @@ const routes: Routes = [
component: CreatAnimeComponent,
canActivate: [AuthGuard],
},
{
path: "detail",
component: DetailAnimeComponent
},
{
path: 'auth',
......
......@@ -14,6 +14,7 @@ import { HomeComponent } from './home/home.component';
import { AuthService } from './shared/services';
import { ManageanimeComponent } from './manageanime/manageanime.component';
import { CreatAnimeComponent } from './creat-anime/creat-anime.component';
import { DetailAnimeComponent } from './detail-anime/detail-anime.component';
export function appInitializerFactory(authService: AuthService) {
return () => authService.checkTheUserOnTheFirstLoad();
......@@ -21,7 +22,7 @@ export function appInitializerFactory(authService: AuthService) {
@NgModule({
imports: [BrowserAnimationsModule, HttpClientModule, SharedModule, AppRoutingModule],
declarations: [AppComponent, HeaderComponent, HomeComponent, ManageanimeComponent, CreatAnimeComponent],
declarations: [AppComponent, HeaderComponent, HomeComponent, ManageanimeComponent, CreatAnimeComponent, DetailAnimeComponent],
providers: [
{
provide: HTTP_INTERCEPTORS,
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DetailAnimeComponent } from './detail-anime.component';
describe('DetailAnimeComponent', () => {
let component: DetailAnimeComponent;
let fixture: ComponentFixture<DetailAnimeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DetailAnimeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DetailAnimeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-detail-anime',
templateUrl: './detail-anime.component.html',
styleUrls: ['./detail-anime.component.css']
})
export class DetailAnimeComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
......@@ -6,6 +6,7 @@
<div>
<a class="links side" *ngIf="user" routerLink="/anime">Manage anime</a>
<a class="links side" *ngIf="user" routerLink="/create">Create anime</a>
<a class="links side" *ngIf="user" routerLink="/detail">Detail anime</a>
<a class="links side" *ngIf="user" [matMenuTriggerFor]="menu">
<mat-icon>account_circle</mat-icon>{{ user.fullname }}
</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment