Last active
August 5, 2017 18:01
-
-
Save cdcarson/2ddf375020be2955dfe2bc1490e43d4d to your computer and use it in GitHub Desktop.
Modal Examples
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 } from '@angular/core'; | |
import { NzbModal } from 'nowzoo-angular-bootstrap-lite'; | |
/**** A sample component we use for modal content *****/ | |
@Component({ | |
selector: 'app-example-modal-content', | |
template:` | |
<div class="modal-header"> | |
<h5 class="modal-title">Enter Your Name</h5> | |
<button type="button" class="close" (click)="modal.dismiss('header dismiss button clicked')" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
</div> | |
<div class="modal-body"> | |
<div class="form-group"> | |
<label for="example-modal-content-name">Name</label> | |
<input type="text" [(ngModel)]="name" class="form-control"> | |
</div> | |
</div> | |
<div class="modal-footer"> | |
<button type="button" class="btn btn-secondary" | |
(click)="modal.dismiss('footer cancel button clicked')">Cancel</button> | |
<button type="button" class="btn btn-primary" | |
(click)="modal.close(name)">Save</button> | |
</div> | |
` | |
}) | |
export class ExampleModalContentComponent { | |
name: string; | |
constructor( public modal: NzbModal ) { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment