Created
March 10, 2019 14:05
-
-
Save gparlakov/52fdec6373a8c7e2c130ccb761a4db4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, ViewEncapsulation } from '@angular/core'; | |
| @Component({ | |
| selector: "gp-button2", | |
| template: ` | |
| <button class="button" (click)="onToggleDialogClick()"> | |
| Show dialog | |
| </button> | |
| <p-dialog header="Title" [(visible)]="visible"> | |
| This is the dialog content | |
| </p-dialog> | |
| `, | |
| styles: [".button { background-color: cyan;}", | |
| "::ng-deep.pi.pi-times {color: red}"] // style the close icon | |
| }) | |
| export class Button2Component { | |
| visible = false; | |
| onToggleDialogClick() { | |
| this.visible = !this.visible; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment