Angular4 : Role based Authorization
Step1: get All user Roles from DB and store it in localStorage eg: ['Reader','Writer']
Step2: on UI component put *ngIf=roleMatch(['Admin'])
=> roleMatch() {..
....compare ['Reader','Writer'] with ['Admin'] => If matches return true...}
No comments:
Post a Comment