Questions tagged [mddialog]

$mdDialog is a directive of AngularJS that opens a dialog over the app to inform users about critical information or require them to make decisions. There are two approaches for setup: a simple promise API and regular object syntax.

Docs

https://material.angularjs.org/latest/api/service/$mdDialog

Demo

https://material.angularjs.org/latest/demo/dialog

Syntax

$mdDialog.show({} /* options */);
167 questions
97
votes
8 answers

Angular Material and Jasmine : " No provider for InjectionToken MdDialogData! "

I have a component which is meant to be used in an Angular Material MdDialog : @Component({ ... }) export class MyComponent { constructor(@Inject(MAT_DIALOG_DATA) public data: any, public dialogRef: MdDialogRef) { ... } } I…
Wenneguen
  • 3,196
  • 3
  • 13
  • 23
31
votes
4 answers

Returning Data from MdDialog in Angular Material 2

I am using a MdDialogModule to show a Dialog window with an input field in it. The Modal is opening fine and I am able to enter text into input field and submit, but on clicking the Submit button, I want the data in the Input form to be returned to…
Hisham Mubarak
  • 1,559
  • 3
  • 22
  • 28
27
votes
3 answers

how to open Md-dialog full screen angular4?

I am trying to pass some property value using config. But dialog not open into full screen. openTwigTemplate(): void { let config = new MdDialogConfig(); config = { position: { top: '10px', right: '10px' }, height:…
Shailesh Ladumor
  • 7,052
  • 5
  • 42
  • 55
10
votes
3 answers

Close md-dialog inside it's component.ts

I have a md-dialog component - DialogComponent - which i open from sibling component - SiblingComponent - and i want to close it in dialog.component.ts after some actions. DialogComponent basically is a form with submit button, submitting form…
esquarial
  • 277
  • 1
  • 4
  • 15
10
votes
4 answers

Access form from within Angular $mdDialog

I am using an Angular 1.5 Material Design $mdDialog in the recommended way, using controllerAs: "dialog". In the template I have a form:
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
10
votes
2 answers

How to set up the max-width of $mdDialog?

I'm a new one in css and can not to set up the max-width of my confirmation dialog properly. Here my code of calling dialog: this.$mdDialog.show({ content: longText, ok: 'OK', cancel: 'CANCEL' clickOutsideToClose: true, }); The problem is…
user3818229
  • 1,537
  • 2
  • 21
  • 46
9
votes
2 answers

mdDialog: catch the onClose event

I'm creating a mailbox in angular. And I would need to save the draft message when the popup to send a message closes. I know there are some alternatives: scope.$on("$destroy", function () { saveMessage() }); and:…
5
votes
3 answers

ng-click on user defined $mdDialog with external template are not working

working the first time with $mdDialog I am used to create a dialog with an external HTML Template. So far, so good,... it works template can get opened, but ng-click in the html wont work anymore. And I cannot find the reason for it. The mdDialog…
5
votes
3 answers

Using MdDialogConfig data on Angular 2

I'm trying to use a dialog component in Angular 2 using @angular/material2.0.0-beta.1. What I'm trying to accomplish is to send data (which are values that a person chooses from the interface, the dialog is used to make the person confirm the values…
Tuco
  • 902
  • 3
  • 18
  • 33
5
votes
0 answers

Angular NVD3 size in Angular Material $mddialog to fill dialog content

I'm using angular-1.5.8, d3-3.5.17, nvd3-1.8.5, and angular-nvd3-1.0.9 with Angular Material. I'm trying to put an NVD3 directive in an $mdDialog. The source code is simple:
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
5
votes
2 answers

Angularjs mdDialog - How to send back data to my first controller

I send some info to my md-Dialog using 'locals' attribute which works perfectly. After the user presses a button he will send some info through $resource method and get a response. I need to show that response after my md-dialog is closed. How do I…
Ezequiel Ramiro
  • 760
  • 1
  • 12
  • 29
5
votes
2 answers

angular material load angularjs 1.5 component into $mdDialog

The goal: to use components and not use $scope to set data. There isn't an error to share, the issue is that the data element isn't set when the dialog loads the component. The screen shot shows the current state of the dialog, there should be an…
Will Lopez
  • 2,089
  • 3
  • 40
  • 64
4
votes
1 answer

Get data from md-dialog on Angular4

I am implementing an md-dialag from Material Design on my Angular 4 application. I have currently achieved to pass data into the modal, but have not been successful to retrieve any data entered by the user on the dialog. This is how I open a…
Multitut
  • 2,089
  • 7
  • 39
  • 63
4
votes
2 answers

Angular-Material : md-select in md-dialog not closing

I've created a simple directive that consists in a form with few md-input and one md-select. I've used my directives in a few pages now and everything works fine, but now i would like to use it inside an md-dialog and it's not working as expected, i…
Freego
  • 456
  • 7
  • 18
4
votes
2 answers

Angular Material $mdDialog.confirm with more than "OK" and "Cancel" options

I have to build an $mdDialog window in Angular Material so that the user can select from different actions. Based on the selected actions, the app will either generate a new report or load an already existing report, or Cancel the dialog altogether.…
Iulia Mihet
  • 650
  • 1
  • 10
  • 34
1
2 3
11 12