{"action":"created","issue":{"url":"https://api.github.com/repos/bendrucker/angular-form-state/issues/2","labels_url":"https://api.github.com/repos/bendrucker/angular-form-state/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/bendrucker/angular-form-state/issues/2/comments","events_url":"https://api.github.com/repos/bendrucker/angular-form-state/issues/2/events","html_url":"https://github.com/bendrucker/angular-form-state/issues/2","id":55609870,"number":2,"title":"custom ng-disabled doesn't work on submit-button directive","user":{"login":"altryne","id":463317,"avatar_url":"https://avatars.githubusercontent.com/u/463317?v=3","gravatar_id":"","url":"https://api.github.com/users/altryne","html_url":"https://github.com/altryne","followers_url":"https://api.github.com/users/altryne/followers","following_url":"https://api.github.com/users/altryne/following{/other_user}","gists_url":"https://api.github.com/users/altryne/gists{/gist_id}","starred_url":"https://api.github.com/users/altryne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altryne/subscriptions","organizations_url":"https://api.github.com/users/altryne/orgs","repos_url":"https://api.github.com/users/altryne/repos","events_url":"https://api.github.com/users/altryne/events{/privacy}","received_events_url":"https://api.github.com/users/altryne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-27T12:07:51Z","updated_at":"2015-01-27T17:26:42Z","closed_at":null,"body":"Hey,\r\nSo it turns out, that using ng-disabled doesn't work on the submit-button directive\r\n\r\nWe have code like so:\r\n```<button type=\"submit\" class=\"btn btn-primary\" tabindex=\"0\"\r\n                            ng-class=\"{ 'btn-locked' : ClearCtrl.bank_form.$invalid }\"\r\n                            submit-button\r\n                            ng-disabled=\"ClearCtrl.bank_form.$invalid\"\r\n                            pending=\"Submitting...\">Continue to clear</button>```\r\n\r\nAnd when the form returns from ajax with an error, the button stops being \"pending\" and removes the disabled state, and then the ng-disabled doesn't work anymore.\r\n\r\nAny way around this?"},"comment":{"url":"https://api.github.com/repos/bendrucker/angular-form-state/issues/comments/71689067","html_url":"https://github.com/bendrucker/angular-form-state/issues/2#issuecomment-71689067","issue_url":"https://api.github.com/repos/bendrucker/angular-form-state/issues/2","id":71689067,"user":{"login":"bendrucker","id":808808,"avatar_url":"https://avatars.githubusercontent.com/u/808808?v=3","gravatar_id":"","url":"https://api.github.com/users/bendrucker","html_url":"https://github.com/bendrucker","followers_url":"https://api.github.com/users/bendrucker/followers","following_url":"https://api.github.com/users/bendrucker/following{/other_user}","gists_url":"https://api.github.com/users/bendrucker/gists{/gist_id}","starred_url":"https://api.github.com/users/bendrucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendrucker/subscriptions","organizations_url":"https://api.github.com/users/bendrucker/orgs","repos_url":"https://api.github.com/users/bendrucker/repos","events_url":"https://api.github.com/users/bendrucker/events{/privacy}","received_events_url":"https://api.github.com/users/bendrucker/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T17:26:42Z","updated_at":"2015-01-27T17:26:42Z","body":"Can you put together a repo that reproduces this? I have basically the same functionality (disable button either when form is invalid or submission is in flight). I just went through the following steps:\r\n\r\n1. Complete the form (button becomes enabled)\r\n2. Use Chrome dev tools to simulate no connection\r\n3. Click button to submit form (error message appears)\r\n4. Delete the contents of a required field (button becomes disabled again)\r\n\r\nIf you're doing something differently let me know. It was definitely my intent to allow `ngDisabled` to be combined with `submitButton`. "}}