Multiple User Types
Example:
this.tokenService.init({
userTypes: [
{ name: 'ADMIN', path: 'admin' },
{ name: 'USER', path: 'user' }
]
});
this.tokenService.signIn({
login: 'example@example.com',
password: 'secretPassword',
userType: 'ADMIN'
})
this.tokenService.currentUserType; // ADMINShowing/Hiding Elements based on UserType
Example:
Last updated
Was this helpful?