{"action":"created","issue":{"url":"https://api.github.com/repos/zurfyx/angular-custom-modal/issues/9","repository_url":"https://api.github.com/repos/zurfyx/angular-custom-modal","labels_url":"https://api.github.com/repos/zurfyx/angular-custom-modal/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/zurfyx/angular-custom-modal/issues/9/comments","events_url":"https://api.github.com/repos/zurfyx/angular-custom-modal/issues/9/events","html_url":"https://github.com/zurfyx/angular-custom-modal/issues/9","id":316863702,"number":9,"title":"Feature Request","user":{"login":"Rlcolli4","id":12074293,"avatar_url":"https://avatars0.githubusercontent.com/u/12074293?v=4","gravatar_id":"","url":"https://api.github.com/users/Rlcolli4","html_url":"https://github.com/Rlcolli4","followers_url":"https://api.github.com/users/Rlcolli4/followers","following_url":"https://api.github.com/users/Rlcolli4/following{/other_user}","gists_url":"https://api.github.com/users/Rlcolli4/gists{/gist_id}","starred_url":"https://api.github.com/users/Rlcolli4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rlcolli4/subscriptions","organizations_url":"https://api.github.com/users/Rlcolli4/orgs","repos_url":"https://api.github.com/users/Rlcolli4/repos","events_url":"https://api.github.com/users/Rlcolli4/events{/privacy}","received_events_url":"https://api.github.com/users/Rlcolli4/received_events","type":"User","site_admin":false},"labels":[{"id":810454551,"url":"https://api.github.com/repos/zurfyx/angular-custom-modal/labels/feature","name":"feature","color":"00ff00","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-23T15:27:54Z","updated_at":"2018-04-24T14:36:20Z","closed_at":null,"author_association":"NONE","body":"So, this would be really handy feature, I was going to try and pull it in but I was prevented from cloning the branch. I thought it would be great if you could add an input on \"modal\" to allow users to disable clicking to close the dialog!\r\n\r\nIn code you could have a getter/setter to set the value and be prepared for if the value is false:\r\n\r\nprivate _closeWithoutButton: boolean; //stores the value for the getter\r\n@Input() set canCloseWithoutButton(value: boolean) {\r\n     this. _closeWithoutButton = value; \r\n}\r\n\r\nget canCloseWithoutButton() {\r\n     //this if statement protects against \r\n     if(this. _closeWithoutButton === null || typeof this. _closeWithoutButton === 'undefined'){\r\n          this. _closeWithoutButton = true;\r\n     }\r\n     return this. _closeWithoutButton;\r\n}\r\n\r\nThen modify your host listener for click to look at this extra variable.\r\n@HostListener('click', ['$event'])\r\n  onContainerClicked(event: MouseEvent): void {\r\n    if ((<HTMLElement>event.target).classList.contains('modal') && this.isTopMost() && this. canCloseWithoutButton) {\r\n      this.close();\r\n    }\r\n  }\r\n\r\nIf I could get pull/push permissions I'd be happy to add this for you, otherwise I hope this is a useful suggestion."},"comment":{"url":"https://api.github.com/repos/zurfyx/angular-custom-modal/issues/comments/383956137","html_url":"https://github.com/zurfyx/angular-custom-modal/issues/9#issuecomment-383956137","issue_url":"https://api.github.com/repos/zurfyx/angular-custom-modal/issues/9","id":383956137,"user":{"login":"Rlcolli4","id":12074293,"avatar_url":"https://avatars0.githubusercontent.com/u/12074293?v=4","gravatar_id":"","url":"https://api.github.com/users/Rlcolli4","html_url":"https://github.com/Rlcolli4","followers_url":"https://api.github.com/users/Rlcolli4/followers","following_url":"https://api.github.com/users/Rlcolli4/following{/other_user}","gists_url":"https://api.github.com/users/Rlcolli4/gists{/gist_id}","starred_url":"https://api.github.com/users/Rlcolli4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rlcolli4/subscriptions","organizations_url":"https://api.github.com/users/Rlcolli4/orgs","repos_url":"https://api.github.com/users/Rlcolli4/repos","events_url":"https://api.github.com/users/Rlcolli4/events{/privacy}","received_events_url":"https://api.github.com/users/Rlcolli4/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T14:36:20Z","updated_at":"2018-04-24T14:36:20Z","author_association":"NONE","body":"This would work perfect! "}}
{"actor":{"display_login":"Rlcolli4"}}