md2-dialog
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.0 • Public • Published

md2-dialog

Native Angular2 Material Dialog component

Installation

npm install --save md2-dialog

Selector

<md2-dialog></md2-dialog>

API

Example:

<md2-dialog #confirm>
   <md2-dialog-title>Confirm Title</md2-dialog-title>
   Body Content...
</md2-dialog>
<button (click)="confirm.show()">Open Confirm Dialog</button>
//app-module.ts
 
import {Md2DialogModule} from 'md2-dialog/dialog';
 
@NgModule({
 imports: [
   Md2DialogModule,
 ],
 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.

Package Sidebar

Install

npm i md2-dialog

Weekly Downloads

4

Version

0.0.1-alpha.0

License

MIT

Last publish

Collaborators

  • dharmeshpipariya