{"action":"created","issue":{"url":"https://api.github.com/repos/angular/material/issues/3897","labels_url":"https://api.github.com/repos/angular/material/issues/3897/labels{/name}","comments_url":"https://api.github.com/repos/angular/material/issues/3897/comments","events_url":"https://api.github.com/repos/angular/material/issues/3897/events","html_url":"https://github.com/angular/material/issues/3897","id":97201955,"number":3897,"title":"md-dialog and directives","user":{"login":"lrondanini","id":10057220,"avatar_url":"https://avatars.githubusercontent.com/u/10057220?v=3","gravatar_id":"","url":"https://api.github.com/users/lrondanini","html_url":"https://github.com/lrondanini","followers_url":"https://api.github.com/users/lrondanini/followers","following_url":"https://api.github.com/users/lrondanini/following{/other_user}","gists_url":"https://api.github.com/users/lrondanini/gists{/gist_id}","starred_url":"https://api.github.com/users/lrondanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrondanini/subscriptions","organizations_url":"https://api.github.com/users/lrondanini/orgs","repos_url":"https://api.github.com/users/lrondanini/repos","events_url":"https://api.github.com/users/lrondanini/events{/privacy}","received_events_url":"https://api.github.com/users/lrondanini/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-25T06:32:18Z","updated_at":"2016-01-15T16:58:23Z","closed_at":"2015-07-29T19:03:04Z","body":"Hi all,\r\n\r\nI apologize if this is an old question but I cannot find a solution. I'm trying to include the code for a dialog inside a directive. In other words:\r\n\r\n`$mdDialog.show({\r\n    .....\r\n    template: '<my-directive></my-directive>', \r\n   .....\r\n})` \r\n\r\nand, of course, \"my directive\" would be\r\n\r\n`<md-dialog>.....</md-dialog>`\r\n\r\nThe problem is that with this approach I get an error from angular-material.js at runtime (I believe it's trying to access the root node for the dialog finding the directive). The only solution is to have the full skeleton of the dialog outside \"my-directive\" and directly imported in $mdDialog.show(). FYI, I tried transclude=true but it's not working either.\r\n\r\nIn case you are wondering the reason for this mess, I'm trying to avoid controllers. Any suggestion? \r\n\r\nThanks!\r\n\r\n \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular/material/issues/comments/172015439","html_url":"https://github.com/angular/material/issues/3897#issuecomment-172015439","issue_url":"https://api.github.com/repos/angular/material/issues/3897","id":172015439,"user":{"login":"darlanalves","id":745095,"avatar_url":"https://avatars.githubusercontent.com/u/745095?v=3","gravatar_id":"","url":"https://api.github.com/users/darlanalves","html_url":"https://github.com/darlanalves","followers_url":"https://api.github.com/users/darlanalves/followers","following_url":"https://api.github.com/users/darlanalves/following{/other_user}","gists_url":"https://api.github.com/users/darlanalves/gists{/gist_id}","starred_url":"https://api.github.com/users/darlanalves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darlanalves/subscriptions","organizations_url":"https://api.github.com/users/darlanalves/orgs","repos_url":"https://api.github.com/users/darlanalves/repos","events_url":"https://api.github.com/users/darlanalves/events{/privacy}","received_events_url":"https://api.github.com/users/darlanalves/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T16:58:23Z","updated_at":"2016-01-15T16:58:23Z","body":"The solution I found so far, if someone lands here from Google or Google Groups:\r\n\r\nhttps://stackoverflow.com/questions/31962534/using-a-directive-as-the-md-dialog/34816085#34816085"}}