I have been able to resolve this issue by adding target="_self"
to the link.
<li><a href="#/foo" target="_self">Foos</a></li>
I found this resolution here.
Ok, so apparently, this is a known issue of sorts: when the locationProvider (i.e. $location
) is injected to one controller, links cease to work globally. One workaround seems to be to rewrite the links via jQuery, and that works:
app.run(function($rootScope) {
$('[ng-app]').on('click', 'a', function() {
window.location.href = $(this).attr('href');
});
});