{"action":"created","issue":{"url":"https://api.github.com/repos/yapplabs/ember-modal-dialog/issues/22","labels_url":"https://api.github.com/repos/yapplabs/ember-modal-dialog/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/yapplabs/ember-modal-dialog/issues/22/comments","events_url":"https://api.github.com/repos/yapplabs/ember-modal-dialog/issues/22/events","html_url":"https://github.com/yapplabs/ember-modal-dialog/issues/22","id":71253680,"number":22,"title":"Custom modals don't have destinationElementId injected","user":{"login":"rlivsey","id":3740,"avatar_url":"https://avatars.githubusercontent.com/u/3740?v=3","gravatar_id":"","url":"https://api.github.com/users/rlivsey","html_url":"https://github.com/rlivsey","followers_url":"https://api.github.com/users/rlivsey/followers","following_url":"https://api.github.com/users/rlivsey/following{/other_user}","gists_url":"https://api.github.com/users/rlivsey/gists{/gist_id}","starred_url":"https://api.github.com/users/rlivsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlivsey/subscriptions","organizations_url":"https://api.github.com/users/rlivsey/orgs","repos_url":"https://api.github.com/users/rlivsey/repos","events_url":"https://api.github.com/users/rlivsey/events{/privacy}","received_events_url":"https://api.github.com/users/rlivsey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-27T11:15:31Z","updated_at":"2015-05-05T13:47:48Z","closed_at":null,"body":"In our app we have some modals which are \"full screen\" and have some custom behaviour/settings (no overlay, different CSS etc…).\r\n\r\nTo accomplish this I made a new component which extends from `ModalDialogComponent` add adds in the custom behaviour so in my templates I can now do:\r\n\r\n```hbs\r\n<full-screen-modal>\r\n    modal contents here\r\n</full-screen-modal>\r\n```\r\n\r\nThis breaks because the wormhole's destination element ID is only [injected into the 'modal-dialog' component](https://github.com/yapplabs/ember-modal-dialog/blob/5802c696333718f7b1268d40962b8a8974c4e688/addon/initializers/add-modals-container.js#L13-15).\r\n\r\nThis is easily worked around by adding another injection:\r\n\r\n```javascript\r\nexport default {\r\n  after: 'add-modals-container',\r\n  name: 'custom-modals',\r\n  initialize(_, application) {\r\n    application.inject('component:full-screen-modal',\r\n                       'destinationElementId',\r\n                       'config:modals-container-id');\r\n  }\r\n};\r\n```\r\n\r\nHowever, ideally we wouldn't have to do this.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yapplabs/ember-modal-dialog/issues/comments/99082786","html_url":"https://github.com/yapplabs/ember-modal-dialog/issues/22#issuecomment-99082786","issue_url":"https://api.github.com/repos/yapplabs/ember-modal-dialog/issues/22","id":99082786,"user":{"login":"lukemelia","id":353,"avatar_url":"https://avatars.githubusercontent.com/u/353?v=3","gravatar_id":"","url":"https://api.github.com/users/lukemelia","html_url":"https://github.com/lukemelia","followers_url":"https://api.github.com/users/lukemelia/followers","following_url":"https://api.github.com/users/lukemelia/following{/other_user}","gists_url":"https://api.github.com/users/lukemelia/gists{/gist_id}","starred_url":"https://api.github.com/users/lukemelia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukemelia/subscriptions","organizations_url":"https://api.github.com/users/lukemelia/orgs","repos_url":"https://api.github.com/users/lukemelia/repos","events_url":"https://api.github.com/users/lukemelia/events{/privacy}","received_events_url":"https://api.github.com/users/lukemelia/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T13:47:48Z","updated_at":"2015-05-05T13:47:48Z","body":"@rlivsey Sounds good to me. Thanks. Please update the docs with your PR, as I think this approach is a little more confusing, but clearly necessary given the feedback."}}