Skip to content

Commit 92e98c9

Browse files
committed
Show choo choo button
1 parent 0621209 commit 92e98c9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

projects/train-platform/src/app/navbar/navbar.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@
1919
<option value="de">{{ "navbar.language.de" | translate }}</option>
2020
</select>
2121
</div>
22+
<div>
23+
- <button (click)="showToast()">🚂</button>
24+
- </div>
2225
</div>
2326
</nav>

projects/train-platform/src/app/navbar/navbar.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component } from '@angular/core';
2+
import { HotToastService } from '@ngneat/hot-toast';
23
import { TranslateService } from '@ngx-translate/core';
34
import { ThemeService } from '../theme.service';
45

@@ -12,6 +13,7 @@ export class NavbarComponent {
1213
theme: 'light' | 'dark' = 'light';
1314

1415
constructor(
16+
private toastService: HotToastService,
1517
private translateService: TranslateService,
1618
private themeService: ThemeService
1719
) {}
@@ -25,4 +27,8 @@ export class NavbarComponent {
2527
this.language = lang;
2628
this.translateService.use(lang);
2729
}
30+
31+
showToast(): void {
32+
this.toastService.success('Choo choo!');
33+
}
2834
}

0 commit comments

Comments
 (0)