File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
projects/train-platform/src/app/navbar Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 19
19
< option value ="de "> {{ "navbar.language.de" | translate }}</ option >
20
20
</ select >
21
21
</ div >
22
+ < div >
23
+ - < button (click) ="showToast() "> 🚂</ button >
24
+ - </ div >
22
25
</ div >
23
26
</ nav >
Original file line number Diff line number Diff line change 1
1
import { Component } from '@angular/core' ;
2
+ import { HotToastService } from '@ngneat/hot-toast' ;
2
3
import { TranslateService } from '@ngx-translate/core' ;
3
4
import { ThemeService } from '../theme.service' ;
4
5
@@ -12,6 +13,7 @@ export class NavbarComponent {
12
13
theme : 'light' | 'dark' = 'light' ;
13
14
14
15
constructor (
16
+ private toastService : HotToastService ,
15
17
private translateService : TranslateService ,
16
18
private themeService : ThemeService
17
19
) { }
@@ -25,4 +27,8 @@ export class NavbarComponent {
25
27
this . language = lang ;
26
28
this . translateService . use ( lang ) ;
27
29
}
30
+
31
+ showToast ( ) : void {
32
+ this . toastService . success ( 'Choo choo!' ) ;
33
+ }
28
34
}
You can’t perform that action at this time.
0 commit comments