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.

Configuring the dialog with data

Configuring the dialog with data

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

Start my 1-month free trial

Configuring the dialog with data

- [Instructor] Now that we created the module and we got the data from the list, let us create the dialog and populate it with data. But first of all, let us go to our project. In our entries.component.ts, let us first inject the Matdialog. So for that write in here private, then dialog, MatDialog. Next inside the update entry where I, this.dialog.open, so we want to open the dialog but we need to define the component that we want to open our dialog with. And we created the UpdateEntryComponent just for this purpose. So let us write in here UpdateEntryComponent and then next, we need to define the data that we want to send to this component. So open in here the curly brackets and then write the data is going to be. Open other curly brackets and then start defining all the properties. So the first property is going to be description, and we are going to get the description from the entry.description, that comma, define the IsExpense, the same way we will get the value from the…

Contents