From the course: Building Applications with Angular, ASP.NET Core, and Entity Framework Core

Unlock the full course today

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

Quiz score dialog

Quiz score dialog

- [Instructor] In this video, we'll create a dialog that pops up when we hit finish, which will display how many questions we got correct out of the total amount of questions. In our frontend editor, let's create a new file in our app. I'll call it finished.component.ts. And let's copy the app component as a template and paste it in. We can get rid of the selector, and we'll have some placeholder text in our template. And then let's rename class. Next lets register it with our app module. And add it to our declarations. Then I'd like to launch the dialog that will be displaying this finished component from our play quiz component, so let's take a look at that. Inside our finished function, it should launch an Angular Materials dialog. Let's go look at the Angular Materials component page under dialog. In the api, you can see we need to import the dialog module, so let's do that. So I'll add it to both imports list. And back on the page, let's look at examples. Under the TS tab, we can…

Contents