Skip to content

Instantly share code, notes, and snippets.

@zac260103
Created January 18, 2018 09:19
Show Gist options
  • Save zac260103/9a25856ab1cc82e2f683e42493308bff to your computer and use it in GitHub Desktop.
Save zac260103/9a25856ab1cc82e2f683e42493308bff to your computer and use it in GitHub Desktop.
this.loginservice.getToken('restclient','password').then(token =>{
this.tokeninfo = token;
this.access_token = this.tokeninfo.access_token;
//console.log("access_token="+this.access_token);
})
this.applistService.getApplist(this.access_token).then(users => {
this.users = users;
}, (error) => {
if (error === 'Unauthorized') {
console.log("ddd");
this.router.navigateByUrl('/dashboard');
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment