Commit bd709bcf authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Fix typo

parent 6e327db8
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" routerLink="home">ENVOL TP Angular</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<button class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" aria-current="page" routerLink="home" routerLinkActive="active"><span class="fas fa-home"></span> Home</a>
<a class="nav-link" aria-current="page" routerLink="home" routerLinkActive="active">
<span class="fas fa-home"></span> Home
</a>
</li>
<li class="nav-item">
<a class="nav-link" routerLink="super-heroes" routerLinkActive="active"><span class="fas fa-mask"></span> Super heroes</a>
<a class="nav-link" routerLink="super-heroes" routerLinkActive="active">
<span class="fas fa-mask"></span> Super heroes
</a>
</li>
</ul>
</div>
......
......@@ -19,17 +19,4 @@ describe('AppComponent', () => {
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'client'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('client');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('.content span')?.textContent).toContain('client app is running!');
});
});
......@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./home.component.scss']
})
export class HomeComponent {
title = 'Bienvenue dans le TP Angular ENVOL 2021';
title: string = 'Bienvenue dans le TP Angular ENVOL 2021';
}
......@@ -12,6 +12,8 @@
</li>
</ul>
<p>
<button class="btn btn-primary" type="button" [disabled]="newHeroAdded" (click)="addNewHero.emit()">Ajouter un nouveau héro</button>
<button class="btn btn-primary" type="button" [disabled]="newHeroAdded" (click)="addNewHero.emit()">
Ajouter un nouveau héro
</button>
</p>
</ng-container>
......@@ -10,14 +10,14 @@ import { delay } from 'rxjs/operators';
})
export class SuperHeroesComponent implements OnInit {
superheroes: string[] = [];
newHero = 'Black Widow';
newHeroAdded = false;
superheroesIsLoading = false;
superheroesIsLoaded = false;
newHero: string = 'Black Widow';
newHeroAdded: boolean = false;
superheroesIsLoading: boolean = false;
superheroesIsLoaded: boolean = false;
constructor(private httpClient: HttpClient) { }
ngOnInit() {
ngOnInit(): void {
this.superheroesIsLoading = true;
this.httpClient.get<string[]>('assets/superheroes.json').pipe(delay(1000)).subscribe(data => {
this.superheroes = data;
......
Supports Markdown
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