{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular/issues/1058","labels_url":"https://api.github.com/repos/angular/angular/issues/1058/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/1058/comments","events_url":"https://api.github.com/repos/angular/angular/issues/1058/events","html_url":"https://github.com/angular/angular/issues/1058","id":63806888,"number":1058,"title":"Two components in a template, the second does not get content projection","user":{"login":"jelbourn","id":838736,"avatar_url":"https://avatars.githubusercontent.com/u/838736?v=3","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/%23core/compiler","name":"#core/compiler","color":"bfdadc"},{"url":"https://api.github.com/repos/angular/angular/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-23T19:08:20Z","updated_at":"2015-03-23T19:08:20Z","closed_at":null,"body":"I have two components: `MdButton` and `MdAnchor`. Their selectors are `[md-button]:not([href])` and `[md-button][href]`, respectively. They both use the same template:\r\n```html\r\n<link href=\"../button.css\" rel=\"stylesheet\">\r\n<span class=\"md-button-wrapper\"><content></content></span>\r\n```\r\n\r\nI have a demo where I render out some buttons and some anchors. It looks something like this:\r\n```html\r\n<button md-button>BUTTON</button>\r\n<a md-button href=\"http://google.com\">ANCHOR</a>\r\n```\r\n\r\nWhichever component is second on the page does not receive content projection. Instead, the placeholder `<script>` tags are still there.\r\n\r\n\r\nYou can see this issue locally:\r\n```\r\ngit fetch https://github.com/jelbourn/angular.git material-2\r\nget checkout tags/projection-bug\r\nnpm install gulp-sass\r\nnpm install gulp-autoprefixer\r\ngulp build.material\r\ngulp serve.js.dev\r\n```\r\nThen visit `http://localhost:8000/angular2/src/material/components/button/demo/?`\r\nYou can see that the anchors are not have their content projected, while the buttons are. If you remove all of the buttons and leave only the anchors, they work fine. Re-add another button after the anchors, and then that button will have the problem."}}