O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding dialog components to our application

Let's create a UserRegister modal for our application. This will look something like this:

import { inject } from 'aurelia-framework'import { DialogController } from 'aurelia-dialog'@inject(DialogController)export class UserForm {
  user = { firstName: '',               lastName: '',           age: 0 };

  activate(user){
    user = user;
  }
}

This is very simple by now. Remember that this component will be the modal itself. The modals are displayed over the main content, so now we will configure this behavior into our Home component. Pay attention to this section; it's a little tricky, but we are sure that you will find it easy to implement.

First, let's import DialogService from our recently imported aurelia-dialog plugin:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required