Why not create a directive to do this that checks the current route, then clears if it changes to something other than the one not driven by angular.
Something like this:
app.directive("clearWhenNot", function($location){
return {
scope: { selfRoute: "@clearWhenNot" },
link: function (scope, element, attributes) {
// watch location.path
scope.$watch(
function (){ return $location.path(); },
function(newVal, oldVal){
// blank the html if the route isn't the _self one.
if(newVal != scope.selfRoute){
element.html('');
}
}
);
}
}
});
I haven't tested this, so let me know if it works - there may be typos!
EDIT to use it:
<div id="full-page-content" clear-when-not="somenonangularroute">
@RenderBody()
</div>
Which would clear the page if you weren't at www.yourapp.com/somenonangularroute
.