Created
January 13, 2018 21:27
-
-
Save krejko/3130398c8a6be1e332fbc6fe57e54f41 to your computer and use it in GitHub Desktop.
View Component
This file contains hidden or 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 { LoginService } from './login.service'; | |
export class ViewComponent implements OnInit { | |
constructor(private loginService: LoginService) {} | |
ngOnInit() { | |
if (this.loginService.login('tester', 'password')) { | |
console.log('Logged In'); | |
} else { | |
console.log('Invalid auth'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment