Created
April 22, 2020 21:16
-
-
Save manoj-choudhari-git/80cc7f7c241f5436f7386be62175359b to your computer and use it in GitHub Desktop.
App component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { AuthService } from './auth.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent implements OnInit { | |
title = 'SecureApp'; | |
constructor(private authService: AuthService) { } | |
ngOnInit() { | |
this.authService.initializeAuth(); | |
} | |
login() { | |
this.authService.logIn(); | |
} | |
logOut() { | |
this.authService.logOut(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment