{"action":"created","issue":{"url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/issues/49","repository_url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict","labels_url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/issues/49/comments","events_url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/issues/49/events","html_url":"https://github.com/AlphaGit/ng-pattern-restrict/issues/49","id":203033534,"number":49,"title":"leading minus not working in input","user":{"login":"schoofseggl","id":25326080,"avatar_url":"https://avatars.githubusercontent.com/u/25326080?v=3","gravatar_id":"","url":"https://api.github.com/users/schoofseggl","html_url":"https://github.com/schoofseggl","followers_url":"https://api.github.com/users/schoofseggl/followers","following_url":"https://api.github.com/users/schoofseggl/following{/other_user}","gists_url":"https://api.github.com/users/schoofseggl/gists{/gist_id}","starred_url":"https://api.github.com/users/schoofseggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schoofseggl/subscriptions","organizations_url":"https://api.github.com/users/schoofseggl/orgs","repos_url":"https://api.github.com/users/schoofseggl/repos","events_url":"https://api.github.com/users/schoofseggl/events{/privacy}","received_events_url":"https://api.github.com/users/schoofseggl/received_events","type":"User","site_admin":false},"labels":[{"id":52750365,"url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/labels/browser:%20chrome","name":"browser: chrome","color":"fef2c0","default":false},{"id":52119705,"url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/labels/type:%20bug","name":"type: bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-01-25T07:45:25Z","updated_at":"2017-01-25T13:33:47Z","closed_at":null,"body":"I use the following pattern for ng-pattern-restrict (as an example)\r\n\r\n`\"^[+\\-]?([1-3])*$\"`\r\n\r\nIt is applied to a input type=number field. When using ng-pattern-restrict, I am not able to start typing numbers with leading + or - signs. But I am in fact able to first type \"2\", and then insert a \"-\" before the \"2\". \r\n\r\nFor some other reasons I cannot use an input type=text field. \r\n\r\nregards\r\n\r\nAndreas\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/issues/comments/275108593","html_url":"https://github.com/AlphaGit/ng-pattern-restrict/issues/49#issuecomment-275108593","issue_url":"https://api.github.com/repos/AlphaGit/ng-pattern-restrict/issues/49","id":275108593,"user":{"login":"schoofseggl","id":25326080,"avatar_url":"https://avatars.githubusercontent.com/u/25326080?v=3","gravatar_id":"","url":"https://api.github.com/users/schoofseggl","html_url":"https://github.com/schoofseggl","followers_url":"https://api.github.com/users/schoofseggl/followers","following_url":"https://api.github.com/users/schoofseggl/following{/other_user}","gists_url":"https://api.github.com/users/schoofseggl/gists{/gist_id}","starred_url":"https://api.github.com/users/schoofseggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schoofseggl/subscriptions","organizations_url":"https://api.github.com/users/schoofseggl/orgs","repos_url":"https://api.github.com/users/schoofseggl/repos","events_url":"https://api.github.com/users/schoofseggl/events{/privacy}","received_events_url":"https://api.github.com/users/schoofseggl/received_events","type":"User","site_admin":false},"created_at":"2017-01-25T13:33:47Z","updated_at":"2017-01-25T13:33:47Z","body":"Just a side-remark: It would be helpful for me if there was a possibility to dynamically disable ng-pattern-restrict (e.g. I would do so for input type=number). Something like `ng-pattern-restrict ng-pattern-restrict-inactive=true`\r\n\r\nIn my case ng-pattern-restrict is used inside another directive and the input type can be configured from outside. \r\n\r\n`<my-input-ctrl type=number pattern=\"patternKey\">` is rendered to something that contains \r\n`<input type=number ng-pattern-restrict=\"patternValue\">`\r\n\r\nNow for number fields I don't need to apply a pattern - as the browser is doing it for me - therefore I would like to use a pattern like \".*\" - the problem is that even with this pattern input number fields are affected by the problem (the reason why I opened this request). \r\n\r\nSo I have to dynamically remove the whole ng-pattern-restrict directive in my custom directive which i find very hard to do dynamically in angular. \r\n\r\n\r\n"}}
{"actor":{"display_login":"schoofseggl"}}