问题标签 [ngx-modal]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
angular - ngx-modal - Angular 2
我正在尝试在我的角度应用程序中实现模态形式。我的代码看起来不错,因为我没有看到任何错误。我已经将 ngx-modal 安装到我的应用程序中,并且我还在ModalModule
我的app.module.ts
文件中导入了 ngx-modal。模态表单没有响应的原因可能是什么?
app.module.ts
angular - Angular2:覆盖 ng2-ckeditor 中的 img 命令
我有一个页面,里面有 ckeditor。我使用 ng2-ckeditor 和 ngx-modal。这是我的模板:
我的情况是尝试覆盖 ckeditor 的图像对话框。所以在我的组件中我会这样做:
一切正常,除非我单击 ckeditor 工具栏中的图像按钮。它将调用函数onUploadImage()
但是this.uploadModal
是undefined
. 如果我们尝试this.uploadModal
在函数中打印输出,ngAfterViewInit()
它会给出正确的值,我们可以在那里打开对话框。
我如何处理函数中的打开对话框onUploadImage
?预先感谢。
angular - Angular 2 使用 Wrapper 扩展 NPM 组件 Ngx-Modal
我正在尝试在 Angular 2 中本地扩展现有的工作组件。我没有得到任何真正有用的指示来说明问题是什么,没有错误等。
所以我修改了一个现有的 plunker ( https://plnkr.co/edit/8x34JbEhYdVms4iYLRvM?p=preview ),它有一个 ngx-modal 工作的例子。
(我正在尝试正确使用这种技术,所以它是 ngx-modal 并不重要,它恰好是我发现一个很好的 plunker 的技术。)
我添加了一个扩展其他组件的新组件...
ngx-modal.component.ts
我用app.ts包装了现有的模式
并注册了组件:
ETC...
在此之后,plunker 不会运行......!
angular - Ngx-Modal when extended 'NativeElement of undefined' Angular 2
This plunker should open up a modal when the button is pressed. I have extended the existing ngx-modal but it throws error: Cannot read property 'nativeElement' of undefined.
Having looked at the console this is because "modalRoot" should be programatically assigned as a ViewChild handler for the modal. It doesn't seem to get defined when extended even though I've added the super() to my constructor, any ideas?
angular - Ngx-Modal 让您在其自身之外进行标签 - Angular 2
我已经在 Ngx-Modal 代码周围放置了一个包装器,因此我可以将一些代码应用于所有 ngx-modals。我还碰巧注意到,当键盘选项卡允许您在模态之外使用时,有人知道如何解决这个问题吗?我在那里放置了一个 keydown 事件来捕获尝试并限制状态......
angular - 如何在 ngx-modal 中以编程方式关闭模式对话框
我正在尝试创建一个登录对话框,该对话框应在成功登录时关闭
我已经创建了登录组件,这是它的 html
如何获取对 html 中定义的模式的引用,以便我可以关闭模式对话框?
angular - 如何在提交角度 5 时从 ngx-modal 检索数据
我正在使用 ngx-modal 创建对话框,下面是 html 中的代码
这是我的 ts 文件中的代码
但我越来越不确定。请建议
添加了组件代码,这里我尝试访问控制台中的数据。
//getEmp 是一个服务调用,用于从 api
getEmp() {
还更新了提交