Skip to content

MatButton not styled if in Dialog exported by Angular Library #18705

@fabriziodebortoli

Description

@fabriziodebortoli

I've created an Angular libray by ng g library xxx with my commons components like a ConfirmDialog using MatDialogModule

In main app <button mat-flat-button color="primary">DIALOG</button> is correctly styled:
image

Opening Dialog, buttons are not styled:
image

Reproduction

I cannot use StackBlitz to reproduce because it not supports angular libraries so I created a repo:
https://github.com/fabriziodebortoli/library-material-dialog-styles.git

Steps to reproduce:

  1. git clone https://github.com/fabriziodebortoli/library-material-dialog-styles.git
  2. cd library-material-dialog-styles
  3. npm install
  4. npm start

Expected Behavior

Buttons inside Dialogs must be styled

Actual Behavior

What behavior did you actually see?

Environment

  • Angular: ~9.0.3
  • CDK/Material: ~9.1.0
  • Browser(s): Latest Chrome

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions