From the course: Building Angular and ASP.NET Web API Apps

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Showing data to the users

Showing data to the users

From the course: Building Angular and ASP.NET Web API Apps

Start my 1-month free trial

Showing data to the users

- [Instructor] So, on the last part we designed our table using the material design, but still we don't see any data in our application. On this part, we are going to see how we can get the data from the database and show them in our table. So let us go to our project. In the entries.component.html file, we have defined that the dataSource is going to be named dataSource, which means that we should have a variable, which is going to hold all the data coming from the database, and then this table will use that source to display all the data. Since we are here, let us remove the button that we created on the previous part, because we don't need that anymore, and then go back to the entries.component.ts. In here, let us define the dataSource. Now, to fill in this dataSource with data, we are going to write some code inside the subscribe method, because inside this method, we get the data or the response from our web api endpoint. For that, let us write here this.dataSource, is equal to…

Contents