In this section, you will learn how to add a dashboard.
First, we need to create a dashboard component. It can be done manually or via angular-cli. For this example, we will use angular-cli. In your integrated terminal, type ng g component Dashboard.
Dashboard files will be automatically generated.
Now, it’s time to add this Dashboard component to our application. Go to the app.routing.ts file and import DashboardComponent.
Save your work and try to run your app. Go back to your browser.
Congratulations! Your dashboard component is now functional. The text ‘dashboard works!’ is a default text when we created it via angular-cli. To change this, simply go to dashboard/dashboard.component.html.
You can now freely update your dashboard text.