Использование ссылки на модель под углом в диалоге кнопка закрытия не работает - PullRequest
0 голосов
/ 28 января 2019
i have set a dialog box in which on click close button is called but at the time of closing i have set a condition if the dialog is for edit then it should be only open and close.

здесь ссылка на модель используется, когда кнопка нажата, и данные, если условие истинно, затем и затем могут быть закрыты.и затем окно открывается с помощью контекстного меню, которое является контекстным меню.

    <button type="button" class="close" aria-label="Close" (click)="modalReference.close()">  
    modalReference: NgbModalRef;
    export declare class NgbModalRef {
    private _windowCmptRef;
    private _contentRef;
    private _backdropCmptRef;
    private _beforeDismiss;
    private _resolve;
    private _reject;
    /**
     * The instance of component used as modal's content.
     * Undefined when a TemplateRef is used as modal's content.
     */
    componentInstance: any;
    /**
     * A promise that is resolved when a modal is closed and rejected when a modal is dismissed.
     */
    result: Promise<any>;
    constructor(_windowCmptRef: ComponentRef<NgbModalWindow>, _contentRef: ContentRef, _backdropCmptRef?: ComponentRef<NgbModalBackdrop>, _beforeDismiss?: Function);
    /**
     * Can be used to close a modal, passing an optional result.
     */
    close(result?: any): void;
    private _dismiss(reason?);
    /**
     * Can be used to dismiss a modal, passing an optional reason.
     */
    dismiss(reason?: any): void;
    private _removeModalElements();
}
    if (this.editMode)
     {  
    this.modalReference.close(); }
...