Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't bind to 'mat-dialog-close' since it isn't a known property of 'button'. #8911

Closed
orenAzuz opened this issue Dec 9, 2017 · 5 comments
Closed

Comments

@orenAzuz
Copy link

orenAzuz commented Dec 9, 2017

Bug, feature request, or proposal:

Hi, I'm trying to work with a tutorial about modal in angular 5 -> https://material.angular.io/components/dialog/overview
and it's not working it giving me the error
Can't bind to 'mat-dialog-close' since it isn't a known property of 'button'.

here is my HTML code:

Warning

Are you sure you want to delete the book {{data.title}} ?

Ok No Thanks

thanks.

@ArchangelX360
Copy link

ArchangelX360 commented Dec 9, 2017

Did you import the MatDialogModule ? For example in your app.module.ts file

import {MatDialogModule} from '@angular/material';

...

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    MatDialogModule,
  ],

@orenAzuz
Copy link
Author

orenAzuz commented Dec 9, 2017

WOW!!! that was the problem thank you very very much!! :)

@ArchangelX360
Copy link

I think you can close the issue as it is not Angular Material's fault ;).

@orenAzuz orenAzuz closed this as completed Dec 9, 2017
@simeyla
Copy link

simeyla commented Oct 20, 2018

If you're opening a dialog with dialog.open in one module and your control is defined in another you must add the Dialog module import to both modules.

This is very easy to forget, and the dialog will open - it's just that then all dialog directives (including mat-dialog-actions / mat-dialog-title and mat-dialog-content will not work).

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants