Commit 44b8f112 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Fix typo

parent 6b3b4ad4
<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';
}
......@@ -7,11 +7,13 @@
<h1>Voici une liste de super héros : </h1>
<ul>
<li *ngFor="let hero of superheroes" [class.isImportant]="hero === 'Thor'">
<i *ngIf="hero === 'Hulk'" class="fas fa-check"></i>
<span *ngIf="hero === 'Hulk'" class="fas fa-check"></span>
{{ hero }}
</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>
......@@ -17,7 +17,7 @@ export class SuperHeroesComponent implements OnInit {
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