本文整理汇总了TypeScript中ng2-adal/core.AdalService.getUser方法的典型用法代码示例。如果您正苦于以下问题:TypeScript AdalService.getUser方法的具体用法?TypeScript AdalService.getUser怎么用?TypeScript AdalService.getUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ng2-adal/core.AdalService
的用法示例。
在下文中一共展示了AdalService.getUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(private bookingService: BookingService, private adalService: AdalService) {
this.BookingReady = true;
this.PurchaseReady = false;
this.adalService.getUser().subscribe(
res => {
this.name = res.profile.name;
},
err => {
console.log(err);
}
);
}
示例2: constructor
constructor(private adalService: AdalService, private bookingService: BookingService) {
this.adalService.getUser().subscribe(
res => {
this.name = res.profile.name.split(' ')[0];
this.bookingService.setUser(res);
},
err => {
console.log(err);
}
);
}
示例3: constructor
constructor(private adalService: AdalService, private authService: AuthService) {
//adal service init
this.adalService.init(this.authService.adalConfig);
this.adalService.handleWindowCallback();
this.adalService.getUser();
}