- Timestamp:
- 11/16/20 03:55:10 (4 years ago)
- Branches:
- master
- Children:
- db484c9
- Parents:
- 8b13eb2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/nav-menu/nav-menu.component.ts
r8b13eb2 r8e74e2f 1 import { Component } from '@angular/core'; 1 import { Component, OnInit } from '@angular/core'; 2 import { AuthService } from '../shared/services/auth.service'; 2 3 3 4 @Component({ … … 6 7 styleUrls: ['./nav-menu.component.css'] 7 8 }) 8 export class NavMenuComponent {9 export class NavMenuComponent implements OnInit { 9 10 isExpanded = false; 11 loggedIn: boolean = false; 12 13 constructor(private authService: AuthService) { 14 15 } 16 17 ngOnInit(): void { 18 if(localStorage.getItem('access_token')) { 19 this.loggedIn = true; 20 } 21 } 22 23 logout() { 24 this.authService.logout(); 25 } 10 26 11 27 collapse() {
Note:
See TracChangeset
for help on using the changeset viewer.