modal-dialog

How to make Angular Material Dialog re sizable in Angular 7?

余生颓废 提交于 2020-03-26 03:59:10
问题 I am using angular material dialog and AngularJS 7 . I am able to drag the dialog but I want to make that dialog re sizable so that used can resize it to what ever the size he wants. const dialogRef = this.dialog.open(DialogCompComponent,{data : "hello"}); dialogRef.afterClosed().subscribe(result => { console.log(`Dialog closed: ${result}); }); Where DialogCompComponent is the dialog content component.How to make this angular material dialog re-sizable? 回答1: I managed to solve your problem,

Is there a way to prevent the default behavior of the a tag with the tabindex = '-1' attribute?

对着背影说爱祢 提交于 2020-03-25 18:48:50
问题 when the descendant node of the region with tabindex -1 (this is a modal dialog window) has a tag, in the macOS safari browser I needed the tabindex = '-1' attribute to trigger the click event on the a tag. However, this causes an issue where the modal scroll goes up when clicking the a tag. The same issue occurred when adding the href = "javascript: void (0)" attribute to the a tag and calling e.preventDefault() inside a function that works when a tag click event is called. <div tabindex="-1

Is there a way to prevent the default behavior of the a tag with the tabindex = '-1' attribute?

北慕城南 提交于 2020-03-25 18:48:22
问题 when the descendant node of the region with tabindex -1 (this is a modal dialog window) has a tag, in the macOS safari browser I needed the tabindex = '-1' attribute to trigger the click event on the a tag. However, this causes an issue where the modal scroll goes up when clicking the a tag. The same issue occurred when adding the href = "javascript: void (0)" attribute to the a tag and calling e.preventDefault() inside a function that works when a tag click event is called. <div tabindex="-1

How to show a bootstrap modal via an Angular-Service

妖精的绣舞 提交于 2020-03-25 17:42:07
问题 I have a global Errorhandler in which I process Client- and Server-Errors. To provide a feedback for the user I want to open a modal which returns the error-message. Therefore I've implemented a modal: import {Component} from '@angular/core'; import {BsModalRef, BsModalService} from 'ngx-bootstrap'; import {Button} from '../../layout-models/button.model'; @Component({ selector: 'error-modal', templateUrl: './error-modal.component.html', styleUrls: ['./error-modal.component.scss'] }) export

How to propagate the text field to the modal dialogue?

你说的曾经没有我的故事 提交于 2020-03-21 10:48:07
问题 I'm trying to 'add a link' functionality to my site. For that I'm using Modal plugin from Twitter Boostrap JS. On the main page there's only the 'link' field to fill, when a user clicks 'add link' button, a modal pops up, and the user sees the complete form to fill: link, title, tags. However, I want the link field to be pre-filled with the value from the previous step. It's similar to what happens when you 'save a link' on delicious.com. However, the problem is that when I insert a

Android: Ask user to either enable wifi or quit app

試著忘記壹切 提交于 2020-02-22 07:43:50
问题 I'm developing a simple app that requires network connectivity to function. When the app starts, and if there is no wi-fi connection, I want to display a modal dialog to the user with two options: 1) Enable wifi or 2) Quit the application. The problem is that I can't find an android method that can be called to close the application if the 'close app' button is clicked. Is there such a method that I haven't found yet? Or is there some better way to handle this entire use case? 回答1: To check

Android: Ask user to either enable wifi or quit app

为君一笑 提交于 2020-02-22 07:42:46
问题 I'm developing a simple app that requires network connectivity to function. When the app starts, and if there is no wi-fi connection, I want to display a modal dialog to the user with two options: 1) Enable wifi or 2) Quit the application. The problem is that I can't find an android method that can be called to close the application if the 'close app' button is clicked. Is there such a method that I haven't found yet? Or is there some better way to handle this entire use case? 回答1: To check

Android: Ask user to either enable wifi or quit app

北战南征 提交于 2020-02-22 07:42:45
问题 I'm developing a simple app that requires network connectivity to function. When the app starts, and if there is no wi-fi connection, I want to display a modal dialog to the user with two options: 1) Enable wifi or 2) Quit the application. The problem is that I can't find an android method that can be called to close the application if the 'close app' button is clicked. Is there such a method that I haven't found yet? Or is there some better way to handle this entire use case? 回答1: To check

Android: Ask user to either enable wifi or quit app

心已入冬 提交于 2020-02-22 07:42:30
问题 I'm developing a simple app that requires network connectivity to function. When the app starts, and if there is no wi-fi connection, I want to display a modal dialog to the user with two options: 1) Enable wifi or 2) Quit the application. The problem is that I can't find an android method that can be called to close the application if the 'close app' button is clicked. Is there such a method that I haven't found yet? Or is there some better way to handle this entire use case? 回答1: To check

Opening modal using NGX and state management

左心房为你撑大大i 提交于 2020-02-21 06:33:52
问题 I'd like to use NGXS to open modal which will set column visibility for datatable. Here is my code: state.ts file: @Action(OpenColumnModal) openColumnModal(ctx: StateContext<FeedStateModel>) { const state = ctx.getState(); const allCols = state.allColumns; return this.modalService.openColumnVisibilityModal(allCols).pipe(tap((result) => { ctx.setState({ ...state, allColumns: result, userColumns: result.filter(col => col.visible) }); }) } modal.service.ts: openColumnVisibilityModal(columns):