File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1
- import { Component } from '@angular/core' ;
1
+ import { Component , OnInit } from '@angular/core' ;
2
2
import { CommonModule } from '@angular/common' ;
3
3
import { RouterLink , RouterOutlet } from '@angular/router' ;
4
4
@@ -9,9 +9,21 @@ import { RouterLink, RouterOutlet } from '@angular/router';
9
9
templateUrl : './app.component.html' ,
10
10
styleUrls : [ './app.component.css' ]
11
11
} )
12
- export class AppComponent {
12
+
13
+ export class AppComponent implements OnInit {
13
14
title = 'angular-routing' ;
14
15
footerUrl = 'https://www.ganatan.com' ;
15
16
footerLink = 'www.ganatan.com' ;
16
- }
17
+ ngOnInit ( ) : void {
18
+
19
+ const navMain = document . getElementById ( 'navbarCollapse' ) ;
20
+ if ( navMain ) {
21
+ navMain . onclick = function onClick ( ) {
22
+ if ( navMain ) {
23
+ navMain . classList . remove ( "show" ) ;
24
+ }
25
+ }
26
+ }
27
+ }
17
28
29
+ }
You can’t perform that action at this time.
0 commit comments