$scope $location
function sideBarCtrl($scope, $location){}
$routeChangeSuccess $scope , , / , $location
$scope.show = true;
$scope.$on('$routeChangeSuccess', function(){
var path = $location.path();
if (path === 'somePathToShow'){
$scope.show = true;
} else if (path === 'somePathToHide') {
$scope.show = false;
}
});
.
<body>
<div ng-controller="SideBarCtrl" ng-show="show">
</div>
<div ng-view></div>
</body>