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

…衆ロ難τιáo~ 提交于 2019-12-11 11:15:12

问题


In my AngularJS app, I need to create something similar to jQuery modal form Dialog to get username from user.

I have used twitter-bootstrap modal and AngularUI dialog . Both of which fall short on two things:

  1. Not able to get auto-focus on username textbox inside the modal whenever modal opens.
  2. Not able to submit username on press of enter button.

Here is PLUNKER of my earlier failed attempt with twitter-bootstrap. Now, I am looking to see if there is already some directive exists which meets my 1 and 2 specific need.


回答1:


I got 1 working through alternate solution Why focus on textbox is not set inside a twitter-bootstrap modal (popup) by AngularJS



来源:https://stackoverflow.com/questions/17661176/how-to-create-angularjs-directive-to-get-jquery-dialog-with-submit-on-press-of-e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!