There are two ways you can solve this:
1.Not a desired way
Using $parent
to access the parent scope.
<div class="panel-header top-sidebar"
ng-click="$parent.showSidebar = !$parent.showSidebar; ">
We only need to access parent for a primitive type but not for an object. So:
2.Appropriate way
Appropriate way is to have the flag showSidebar
inside a model object on scope lik.
$scope.someModel = { showSidebar: true }
and then refer it inside the included page because when you ng-inlcude, a new child scope is created off of the parent. But in this case, since you are referring to the object reference, the changes will be reflected in child as well as parent scope.
Here is a DEMO. Click on text "Inside" to see the change.