In this section, we are going to redirect users to a dedicated Messages page when they click the group entry. Let's get started:
- Run the following command to generate a Messages component:
ng g component messages
- The output of the preceding command should be similar to the following:
CREATE src/app/messages/messages.component.scss (0 bytes)
CREATE src/app/messages/messages.component.html (23 bytes)
CREATE src/app/messages/messages.component.spec.ts (642 bytes)
CREATE src/app/messages/messages.component.ts (278 bytes)
UPDATE src/app/app.module.ts (1477 bytes)
- Next, you need to update the app-routing.module.ts file. We are doing this because we need to register a new route that we're going to map to the MessagesComponent we have just generated.
- Let's use a URL path such as chat/:group/messages...