{"action":"created","issue":{"url":"https://api.github.com/repos/mbenford/ngTagsInput/issues/463","repository_url":"https://api.github.com/repos/mbenford/ngTagsInput","labels_url":"https://api.github.com/repos/mbenford/ngTagsInput/issues/463/labels{/name}","comments_url":"https://api.github.com/repos/mbenford/ngTagsInput/issues/463/comments","events_url":"https://api.github.com/repos/mbenford/ngTagsInput/issues/463/events","html_url":"https://github.com/mbenford/ngTagsInput/issues/463","id":76924970,"node_id":"MDU6SXNzdWU3NjkyNDk3MA==","number":463,"title":"Can `on-tag-adding` accept a promise?","user":{"login":"gwgundersen","id":2818208,"node_id":"MDQ6VXNlcjI4MTgyMDg=","avatar_url":"https://avatars0.githubusercontent.com/u/2818208?v=4","gravatar_id":"","url":"https://api.github.com/users/gwgundersen","html_url":"https://github.com/gwgundersen","followers_url":"https://api.github.com/users/gwgundersen/followers","following_url":"https://api.github.com/users/gwgundersen/following{/other_user}","gists_url":"https://api.github.com/users/gwgundersen/gists{/gist_id}","starred_url":"https://api.github.com/users/gwgundersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwgundersen/subscriptions","organizations_url":"https://api.github.com/users/gwgundersen/orgs","repos_url":"https://api.github.com/users/gwgundersen/repos","events_url":"https://api.github.com/users/gwgundersen/events{/privacy}","received_events_url":"https://api.github.com/users/gwgundersen/received_events","type":"User","site_admin":false},"labels":[{"id":150263115,"node_id":"MDU6TGFiZWwxNTAyNjMxMTU=","url":"https://api.github.com/repos/mbenford/ngTagsInput/labels/status:%20replied","name":"status: replied","color":"9A2EFE","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2015-05-16T02:36:51Z","updated_at":"2018-08-13T16:57:10Z","closed_at":"2016-02-04T03:45:57Z","author_association":"NONE","body":"When the user selects the first tag in my autocomplete dictionary—it has the property `newField: true`—, I'd like to open a modal box and then either accept the new tag or reject it, depending on whether or not the user clicks \"ok\" or \"cancel\" in the modal box. So something like this:\n\n```\nscope.addNew = function(newTag) {\n    if (!newTag.newField) {\n        return true;\n    }\n    return $q(function(resolve, reject) {\n        $modal.open({\n            templateUrl: 'releases/addModal/addModal.html',\n            controller: function($scope, $modalInstance) {\n                $scope.ok = function() {\n                    newTag.text = $scope.newText.text;\n                    newTag.newField = false;\n                    $modalInstance.close();\n                    resolve(true);\n                };\n                $scope.cancel = function() {\n                    $modalInstance.dismiss('cancel');\n                    reject(false);\n                };\n            }\n        });\n    });\n}\n```\n\nIs this kind of functionality possible? If not, it seems like something nice to have.\n"},"comment":{"url":"https://api.github.com/repos/mbenford/ngTagsInput/issues/comments/412588538","html_url":"https://github.com/mbenford/ngTagsInput/issues/463#issuecomment-412588538","issue_url":"https://api.github.com/repos/mbenford/ngTagsInput/issues/463","id":412588538,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU4ODUzOA==","user":{"login":"iarabaci","id":5711035,"node_id":"MDQ6VXNlcjU3MTEwMzU=","avatar_url":"https://avatars3.githubusercontent.com/u/5711035?v=4","gravatar_id":"","url":"https://api.github.com/users/iarabaci","html_url":"https://github.com/iarabaci","followers_url":"https://api.github.com/users/iarabaci/followers","following_url":"https://api.github.com/users/iarabaci/following{/other_user}","gists_url":"https://api.github.com/users/iarabaci/gists{/gist_id}","starred_url":"https://api.github.com/users/iarabaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iarabaci/subscriptions","organizations_url":"https://api.github.com/users/iarabaci/orgs","repos_url":"https://api.github.com/users/iarabaci/repos","events_url":"https://api.github.com/users/iarabaci/events{/privacy}","received_events_url":"https://api.github.com/users/iarabaci/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T16:57:10Z","updated_at":"2018-08-13T16:57:10Z","author_association":"NONE","body":"+1"}}
{"actor":{"display_login":"iarabaci"}}