简体   繁体   English

如何创建AngularJS指令以按输入按钮提交带有提交的jquery对话框

[英]How to create AngularJS directive to get jquery Dialog with submit on press of enter button

In my AngularJS app, I need to create something similar to jQuery modal form Dialog to get username from user. 在我的AngularJS应用中,我需要创建类似于jQuery模态对话框的东西,以从用户那里获取用户名。

I have used twitter-bootstrap modal and AngularUI dialog . 我使用了twitter-bootstrap模态AngularUI对话框 Both of which fall short on two things: 两者都在以下两点上不足:

  1. Not able to get auto-focus on username textbox inside the modal whenever modal opens. 模态打开时,无法自动关注模态内的username文本框。
  2. Not able to submit username on press of enter button. 按下Enter键无法提交用户名。

Here is PLUNKER of my earlier failed attempt with twitter-bootstrap. 这是我先前使用twitter-bootstrap失败尝试的PLUNKER Now, I am looking to see if there is already some directive exists which meets my 1 and 2 specific need. 现在,我正在查看是否已经存在一些满足我的1和2特定需求的指令。

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

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