如何将布尔值转换为Observable <boolean>?这可能吗?

时间:2017-03-30 12:05:12

标签: typescript

public isFunctionAssigned(user: IUser, functionality: string): Observable<boolean> {

    //get list of claims assigned
    let userClaims: IClaim[] = [];

    let functionalities: string[] = [functionality];
    let assignedFunctions: string[] = [];

    this.getUserAssignedFunctions(user, functionalities).subscribe(
        userFunctions => {
            return (!(userFunctions && userFunctions.length > 0));
        }
    );
} 

0 个答案:

没有答案