{"push_id":1053085063,"size":1,"distinct_size":1,"ref":"refs/heads/wip/sidnav_lookup","head":"d5900684ffd45ce9aacddfbef0e4df537916b179","before":"8d6e2bec454830aef6c513e529b65f219d723def","commits":[{"sha":"d5900684ffd45ce9aacddfbef0e4df537916b179","author":{"email":"ef1f6b77ccacd9e2421a06786343e0c851932258@Gmail.com","name":"Thomas Burleson"},"message":"fix(sidenav): mdSideNav should support deferred or instant component lookups\n\nPrevious API does not support any way to determine if the component exists (has been instantiated) since the response will give a \"fake\" instance reference.\nThe current API supports `$mdSideNav().find(id)`, `$mdSideNav().waitFor(id)`, `$mdSideNav(id)` usages.\n\nThis fix will allow code like this:\n\n```js\n// If the component has already been instantiated\n$scope.isOpenRight = function(){\n      return $mdSidenav('right').isOpen();\n};\n\nvar right;\n\n// If the component will be created later\n$scope.isOpenRight = function(){\n  if ( angular.isUndefined(right) ) {\n    $mdSidenav()\n      .waitFor('right')\n      .then(function(instance){\n        right = instance;\n      })\n  }\n  return right ? right.isOpen() : false;\n};\n\n```","distinct":true,"url":"https://api.github.com/repos/angular/material/commits/d5900684ffd45ce9aacddfbef0e4df537916b179"}]}