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,9 +192,15 @@ class DocumentListDemo implements OnInit {
} }
login() { login() {
this.authService.login('admin', 'admin').subscribe(token => { this.authService.login('admin', 'admin').subscribe(
this.authenticated = true; token => {
}); console.log(token);
this.authenticated = true;
},
error => {
console.log(error);
this.authenticated = false;
});
} }
} }

View File

@@ -103,10 +103,16 @@ 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(
this.authenticated = true; token => {
}); console.log(token);
this.authenticated = true;
},
error => {
console.log(error);
this.authenticated = false;
});
} }
} }