无法使用角度材料以角度加载 POPUP [英] Unable to load the POPUP in angular using angular material

查看:34
本文介绍了无法使用角度材料以角度加载 POPUP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个示例 stackblitz 演示,在弹出组件中实现了一个简单的角度材料表.

我还使用了一个空表,我将选定的表行从我的第一个表推送到第二个空表.

但问题就在这里,我无法运行 stackblitz 示例,我尝试了各种方法来解决该问题,但找不到解决方案.

有人能帮我解决这个问题吗popup undefined"

而且,当我将表行传输到空表时,我无法选中第二个表中的复选框以将它们删除回第一个表中.

请访问我的

解决方案

单独导入你的对话框模块

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

代替

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

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

I have created a sample stackblitz demo implementing a simple angular material table in the popup component.

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.

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.

解决方案

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

这篇关于无法使用角度材料以角度加载 POPUP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆