Chrome auto save logn/password

2,320 views
Skip to first unread message

jmeco

unread,
Dec 13, 2012, 11:30:05 AM12/13/12
to ang...@googlegroups.com
Hi,

I try to make the chrome save password feature to work with my angular app. The problem seems that chrome only ask to save the password if the form is submited to a real page, according to my test in this plunkr:  http://plnkr.co/edit/M0wmvDMET0mGaLLneP2y?p=preview
If I remove the action="whatever" chrome does not ask to save the password.
Did someone succeed to make this feature works with angularjs ?
Thanks.

jmeco

unread,
Dec 13, 2012, 2:42:25 PM12/13/12
to ang...@googlegroups.com
Sorry the ling is not correct, the plunker link is http://plnkr.co/M0wmvDMET0mGaLLneP2y

For the moment I did a ugly hack, see my forked plunker http://plnkr.co/edit/M0wmvDMET0mGaLLneP2y?p=preview :
1- I added a route for POST request on the app url 
1- Real login is done  the angular way ($http request) with a click handler on the submit button (not a submit input).
2- if succes, then call the submit action with jquery. This trigger chrome to ask to save the password, and because the cookie is already set the login modal does not appear. 
3- if failed just display the error message.

I also had to deal with the event issue with auto fill as reported here https://github.com/angular/angular.js/issues/1460 

A better solution would be welcome!

Darryl Barrow

unread,
Apr 13, 2013, 7:17:55 AM4/13/13
to ang...@googlegroups.com
Jean, I am trying to use this technique.  However I am using ng-view to load forms.  I can't figure out what to use for my form action value.  I really want to get the password to be remembered.  
Thanks.
Reply all
Reply to author
Forward
0 new messages