-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
area: material/dialogneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bugThe issue does not contain enough information for the team to determine if it is a real bug
Description
Reproduction
Due the complexity to create the environment (custom elements running from an external web site), it is not possible to use StackBlitz to reproduce this issue.
Instead, I created the following repo: https://github.com/gcherem/custom-elements-bug
Steps to reproduce:
- run npm run build:elements in widget folder to build the scripts
- put widget/elements files in a web server (I used https://github.com/kzahel/web-server-chrome)
- double-click html/index.html (depending where you put the scripts, you may need to adapt index.html to find the scripts)
- click open modal button
Expected Behavior
Should show interpolated text and conditional structural (when satisfied) in material dialogs. By the other hand, everything works outside the dialog (main page).
Actual Behavior
Elements with interpolation {{ ...}} are not renderized at all. As well structural conditions (ngIf), even when the condition is true.
template
<div class="mat-typography">
<h2>Widget</h2>
<p>line 1</p>
<p>line 2: {{ variable }}</p>
<p>line 3</p>
<p *ngIf="show">line 4: This line also does not appear on modal</p>
<p>line 5</p>
<p>Cannot see lines 2 and 4 on modal</p>
</div>
PS.: No error reported at the console
Environment
- Angular: 11.1.1
- CDK/Material: 11.1.1
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOs Catalina
Metadata
Metadata
Assignees
Labels
area: material/dialogneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bugThe issue does not contain enough information for the team to determine if it is a real bug