Adding Dashboard [Angular Tutorial]

In this section, you will learn how to add a dashboard.

adding 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.

adding a dashboard

Dashboard files will be automatically generated.

adding a dashboard

Now, it’s time to add this Dashboard component to our application. Go to the app.routing.ts file and import DashboardComponent.

adding a dashboard

Save your work and try to run your app. Go back to your browser.

adding a dashboard

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.

adding a dashboard

You can now freely update your dashboard text.

Subscribe Now and Upgrade Your Skills Today!
Sign up now and have the latest tech tutorials delivered straight to your mailbox.

PLUS: Get exclusive member-only discounts (up to 80% OFF!!) on our top tech courses in Udemy!
We hate spam. Your email address will not be sold or shared with anyone else.