import { Component } from '@angular/core' ; import { MdDialog } from '@angular/material' ; import { SettingsComponent } from '../settings/settings.component' ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] } ) export class AppComponent { constructor ( public dialog ) { } showSettings ( ) { this . dialog . open ( SettingsComponent , { width : '50%' } ) ; } }