From the course: Building Angular and Django Apps

Unlock the full course today

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

Displaying a data table with Angular Material table

Displaying a data table with Angular Material table

From the course: Building Angular and Django Apps

Start my 1-month free trial

Displaying a data table with Angular Material table

- [Instructor] In the tour package list component, we're going to construct a table using angular material components. The data source for the table is the packages variable. And now, we're going to define the column definitions. Create an NG container. And then we use mat column def, and this is for the name column. So the name field of each package. So we define the header, and we need to use mat header cell def. And then we're going to define the value that will be displayed within this cell for this column. We call it element. And then we're going to provide a link to the update page for the package. And we're displaying the element name. And then we define the column definition for the price field. And it's similar to the name field definition. And we're going to be piping the price through the currency filter. And then we define another column for the tour link. And we have the header cell for this…

Contents