Add New Role
To add a new role there are few steps you have to follow, I will explain to you every step with examples and screen shots.
Suppose you are going to add a new module Parents, so first of all
you
have to generate
modules and components using the Angular CLI command. e.g. ng g m
Parents
for module and ng g c Parents/ParentsComponent
for component.
Now first of all you have to change in role.ts
file and add new role
Parents. see in screenshot:
1. role.ts

Now add new user "parents" in auth.service.ts file in user array. For static data, we set user array in service you can get user from the database or any other way. see in the screenshot:
2. auth.service.ts

Now you have to add "parents" module entry in sidebar-item.ts
file which
is
located in
the layout/sidebar directory. To display your module in the sidebar menu. see in the
screenshot:
3. sidebar-item.ts

Now need to add some role related entry in sidebar.component.ts
:
4. sidebar.component.ts


In last stage you have to mention the redirect url in
signin.component.ts
when login success. see in the
screenshot:
5. signin.component.ts

Add new image "parents.png" for parents user role in images/user module. Don't forget to routing code for parents module in your project.
That's it!!!