import {Component, ViewEncapsulation} from "@angular/core";
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'model-test',
encapsulation: ViewEncapsulation.None,
styles: [`
.dark-modal .modal-content {
background-color: #2b669a;
color: white;
}
`],
templateUrl: './model.component.html'
})
export class ModelTestComponent {
username: string;
password: string;
model: any;
constructor(private modalService: NgbModal) {}
open(content) {
this.model = this.modalService.open(content, { windowClass: 'dark-modal',size: 'lg'});
}
submit() {
this.model.close();
}
}
×
let-c="close" let-d="dismiss"
输入用户名:
输入密码:
打开模态框