0.0.1-alpha.1 • Published 8 years ago

md-dialog v0.0.1-alpha.1

Weekly downloads
29
License
MIT
Repository
github
Last release
8 years ago

md-dialog

Native Angular2 Material Dialog component

Installation

npm install --save md-dialog

Selector

<md-dialog></md-dialog>

API

Example:

<md-dialog #confirm>
	<md-dialog-title>Confirm Title</md-dialog-title>
	Body Content...
</md-dialog>
<button (click)="confirm.show()">Open Confirm Dialog</button>
//app-module.ts

import {MdDialogModule} from 'md-dialog/dialog';

@NgModule({
 imports: [
   MdDialogModule,
 ],
 declarations: [
   ...
 ]  
})

//component.ts

...

@Component({
   selector: "..."
})

export class ... {
   
   ...

}

Properties

  • [title] - string - (Default: null)(Optional) - The title of the dialog

Open/Close Dialog

Use the component's show() and close() method to properly trigger the dialog's display. Reference the dialog using in your view to have access to the method to use.