How to use the @ng-bootstrap/ng-bootstrap.NgbModal function in @ng-bootstrap/ng-bootstrap

To help you get started, we’ve selected a few @ng-bootstrap/ng-bootstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github junkerm / specmate / bundles / specmate-ui-core / webcontent / app / services / notification / error-notification-modal.service.js View on Github external
this.isOpen = true;
            var modalRef = this.modalService.open(error_modal_content_component_1.ErrorModalContent);
            modalRef.componentInstance.message = message;
            return modalRef.result.then(function (result) {
                _this.isOpen = false;
                return Promise.resolve(result);
            }).catch(function (result) {
                _this.isOpen = false;
                return Promise.reject(result);
            });
        }
        return Promise.reject('Modal already open.');
    };
    ErrorNotificationModalService = __decorate([
        core_1.Injectable(),
        __metadata("design:paramtypes", [ng_bootstrap_1.NgbModal, logging_service_1.LoggingService])
    ], ErrorNotificationModalService);
    return ErrorNotificationModalService;
}());
exports.ErrorNotificationModalService = ErrorNotificationModalService;
github junkerm / specmate / bundles / specmate-ui-core / webcontent / app / modules / notification / modules / modals / services / confirmation-modal.service.js View on Github external
ConfirmationModal.prototype.open = function (message, withCancel) {
        if (withCancel === void 0) { withCancel = true; }
        var modalRef = this.modalService.open(confirmation_modal_content_component_1.ConfirmationModalContent);
        modalRef.componentInstance.message = message;
        modalRef.componentInstance.withCancel = withCancel;
        return modalRef.result;
    };
    ConfirmationModal.prototype.confirmSave = function (message) {
        if (this.dataService.hasCommits) {
            return this.open(message || config_1.Config.CONFIRM_SAVE_MESSAGE);
        }
        return Promise.resolve();
    };
    ConfirmationModal = __decorate([
        core_1.Injectable(),
        __metadata("design:paramtypes", [ng_bootstrap_1.NgbModal, specmate_data_service_1.SpecmateDataService])
    ], ConfirmationModal);
    return ConfirmationModal;
}());
exports.ConfirmationModal = ConfirmationModal;
github junkerm / specmate / bundles / specmate-ui-core / webcontent / app / services / notification / confirmation-modal.service.js View on Github external
ConfirmationModal.prototype.open = function (message, withCancel) {
        if (withCancel === void 0) { withCancel = true; }
        var modalRef = this.modalService.open(confirmation_modal_content_component_1.ConfirmationModalContent);
        modalRef.componentInstance.message = message;
        modalRef.componentInstance.withCancel = withCancel;
        return modalRef.result;
    };
    ConfirmationModal.prototype.confirmSave = function (message) {
        if (this.dataService.hasCommits) {
            return this.open(message || config_1.Config.CONFIRM_SAVE_MESSAGE);
        }
        return Promise.resolve();
    };
    ConfirmationModal = __decorate([
        core_1.Injectable(),
        __metadata("design:paramtypes", [ng_bootstrap_1.NgbModal, specmate_data_service_1.SpecmateDataService])
    ], ConfirmationModal);
    return ConfirmationModal;
}());
exports.ConfirmationModal = ConfirmationModal;
github junkerm / specmate / bundles / specmate-ui-core / webcontent / app / modules / notification / modules / modals / services / error-notification-modal.service.js View on Github external
this.isOpen = true;
            var modalRef = this.modalService.open(error_modal_content_component_1.ErrorModalContent);
            modalRef.componentInstance.message = message;
            return modalRef.result.then(function (result) {
                _this.isOpen = false;
                return Promise.resolve(result);
            }).catch(function (result) {
                _this.isOpen = false;
                return Promise.reject(result);
            });
        }
        return Promise.reject('Modal already open.');
    };
    ErrorNotificationModalService = __decorate([
        core_1.Injectable(),
        __metadata("design:paramtypes", [ng_bootstrap_1.NgbModal, logging_service_1.LoggingService])
    ], ErrorNotificationModalService);
    return ErrorNotificationModalService;
}());
exports.ErrorNotificationModalService = ErrorNotificationModalService;