{"action":"created","issue":{"url":"https://api.github.com/repos/angular/material/issues/5472","labels_url":"https://api.github.com/repos/angular/material/issues/5472/labels{/name}","comments_url":"https://api.github.com/repos/angular/material/issues/5472/comments","events_url":"https://api.github.com/repos/angular/material/issues/5472/events","html_url":"https://github.com/angular/material/issues/5472","id":114391460,"number":5472,"title":"md-scroll-shrink fails to work if angular ui-router is used","user":{"login":"Todd-Werelius","id":5982829,"avatar_url":"https://avatars.githubusercontent.com/u/5982829?v=3","gravatar_id":"","url":"https://api.github.com/users/Todd-Werelius","html_url":"https://github.com/Todd-Werelius","followers_url":"https://api.github.com/users/Todd-Werelius/followers","following_url":"https://api.github.com/users/Todd-Werelius/following{/other_user}","gists_url":"https://api.github.com/users/Todd-Werelius/gists{/gist_id}","starred_url":"https://api.github.com/users/Todd-Werelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Todd-Werelius/subscriptions","organizations_url":"https://api.github.com/users/Todd-Werelius/orgs","repos_url":"https://api.github.com/users/Todd-Werelius/repos","events_url":"https://api.github.com/users/Todd-Werelius/events{/privacy}","received_events_url":"https://api.github.com/users/Todd-Werelius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-31T06:44:26Z","updated_at":"2015-11-05T08:32:09Z","closed_at":null,"body":"When setting up a tool bar to hide on scroll  adding a ui-view element from the angular ui-router library to the md-content sibling prevents the intended function from working.\r\n\r\nFor some reason it interferes with the DOM manipulation that allows the hide on-scroll functionality to behave properly.   \r\n\r\nRemoving the ui-view element allows the intended behavior\r\n\r\n```html\r\n  <md-toolbar md-scroll-shrink ng-if=\"true\" class=\"md-whiteframe-6dp\">\r\n  </md-toolbar>\r\n\r\n  <!-- Main Content Viewing area -->\r\n  <md-content ui-view class=\"main-content\">\r\n  </md-content>\r\n```\r\n\r\nThis [Codepen](http://codepen.io/Mopholo/pen/yYEjNQ?editors=100) shows the problem.  \r\n\r\nIn the codepen you will see that scrolling leaves the toolbar fixed in place, removing the ui-view element from the md-content sibling allows the toolbar to hide as you scroll down, as intended\r\n\r\nThis can be worked around by using an inner element instead of the md-content element as the ui-view container, at a minimum a note should be put in place in the documentation since ui-router is popular. "},"comment":{"url":"https://api.github.com/repos/angular/material/issues/comments/153987303","html_url":"https://github.com/angular/material/issues/5472#issuecomment-153987303","issue_url":"https://api.github.com/repos/angular/material/issues/5472","id":153987303,"user":{"login":"hkjels","id":339547,"avatar_url":"https://avatars.githubusercontent.com/u/339547?v=3","gravatar_id":"","url":"https://api.github.com/users/hkjels","html_url":"https://github.com/hkjels","followers_url":"https://api.github.com/users/hkjels/followers","following_url":"https://api.github.com/users/hkjels/following{/other_user}","gists_url":"https://api.github.com/users/hkjels/gists{/gist_id}","starred_url":"https://api.github.com/users/hkjels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkjels/subscriptions","organizations_url":"https://api.github.com/users/hkjels/orgs","repos_url":"https://api.github.com/users/hkjels/repos","events_url":"https://api.github.com/users/hkjels/events{/privacy}","received_events_url":"https://api.github.com/users/hkjels/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T08:32:09Z","updated_at":"2015-11-05T08:32:09Z","body":"Just replace:\r\n```html\r\n<md-content ui-view class=\"main-content\">\r\n</md-content>\r\n```\r\nwith:\r\n```html\r\n<md-content class=\"main-content\">\r\n  <ui-view></ui-view>\r\n</md-content>\r\n```\r\n`md-toolbar` requires `md-content` to be a sibling of the same `$scope`. This is a documented limitation."}}