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

@@ -192,8 +192,14 @@ class DocumentListDemo implements OnInit {
} }
login() { login() {
this.authService.login('admin', 'admin').subscribe(token => { this.authService.login('admin', 'admin').subscribe(
token => {
console.log(token);
this.authenticated = true; this.authenticated = true;
},
error => {
console.log(error);
this.authenticated = false;
}); });
} }
} }

View File

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