简体   繁体   English

无法使用角形材料以角形加载POPUP

[英]Unable to load the POPUP in angular using angular material

I have created a sample stackblitz demo implementing a simple angular material table in the popup component. 我创建了一个样本stackblitz演示,该示例在popup组件中实现了一个简单的角度材质表。

I have also taken an empty table where I am pushing the selected table rows from my first table to second empty table. 我还拿了一个空表,在其中我将所选表行从第一个表推送到第二个空表。

But the problem is here I am unable to run the stackblitz example, I tried out various ways to fix the issue but I am unable to find the solution. 但是问题出在这里,我无法运行stackblitz示例,我尝试了各种方法来解决此问题,但找不到解决方案。

Can anybody please help me out in resolving the issue "popup undefined" 任何人都可以帮助我解决“弹出窗口未定义”问题

And also when I am transferring table rows to the empty table , I am unable to select the checkbox in the second table to remove them back in the first table. 而且,当我将表行转移到空表时,我无法选择第二个表中的复选框以将其删除回第一个表中。

Please access my sample demo here. 在此处访问我的示例演示。

Below shown is the screenshot of the error. 下面显示的是错误的屏幕截图。

在此处输入图片说明

You have not imported OpenPopup in your main.ts . 您还没有进口OpenPopupmain.ts

Make the following changes 进行以下更改

main.ts : main.ts

Import {TableComponent,OpenPopup} from './path'

tableComponent.component.ts tableComponent.component.ts

import { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material';

Import your dialog module separately 分别导入对话框模块

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

instead of 代替

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

Working link : https://stackblitz.com/edit/angular-table-data-swap-y7sbxp?file=main.ts 工作链接: https : //stackblitz.com/edit/angular-table-data-swap-y7sbxp?file=main.ts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM