fix for demo

This commit is contained in:
Mario Romano
2016-06-17 17:12:48 +01:00
parent 52689806e6
commit ffbfa2d4c2
2 changed files with 19 additions and 7 deletions

View File

@@ -103,10 +103,16 @@ export class MyDemoApp implements OnInit {
this.login();
}
public login(): void {
this.authService.login('admin', 'admin').subscribe(token => {
this.authenticated = true;
});
login() {
this.authService.login('admin', 'admin').subscribe(
token => {
console.log(token);
this.authenticated = true;
},
error => {
console.log(error);
this.authenticated = false;
});
}
}