This repository was archived by the owner on Nov 30, 2022. It is now read-only.
Commit 986c4ba 1 parent b904bce commit 986c4ba Copy full SHA for 986c4ba
File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 3
3
< ion-buttons slot ="start ">
4
4
< ion-menu-button > </ ion-menu-button >
5
5
</ ion-buttons >
6
- < ion-title > {{title}}</ ion-title >
6
+ < ion-title (click) =" onTitleClicked() " > {{title}}</ ion-title >
7
7
< ion-buttons slot ="end ">
8
8
< a id ="github " href ="https://github.com/fivethree-team/fivethree " target ="blank ">
9
9
< ion-icon slot ="icon-only " name ="logo-github "> </ ion-icon >
Original file line number Diff line number Diff line change
1
+ ion-title {
2
+ cursor : pointer ;
3
+ }
4
+
1
5
#github {
2
6
color : var (--ion-color-light-contrast );
3
7
}
Original file line number Diff line number Diff line change
1
+ import { NavController } from '@ionic/angular' ;
1
2
import { Component , OnInit , Input } from '@angular/core' ;
2
3
3
4
@Component ( {
@@ -9,9 +10,13 @@ export class HeaderComponent implements OnInit {
9
10
10
11
@Input ( ) title = 'Fivethree' ;
11
12
12
- constructor ( ) { }
13
+ constructor ( private navController : NavController ) { }
13
14
14
15
ngOnInit ( ) {
15
16
}
16
17
18
+ onTitleClicked ( ) {
19
+ this . navController . navigateRoot ( '/' ) ;
20
+ }
21
+
17
22
}
You can’t perform that action at this time.
0 commit comments