I am working with angularjs in html 5 mode. Which appears to take control of all href\'s on the page. But what if I want to have a link to something within the same domain o
Other solution. All links will work normally (reload page). Links marked by ng-href="/path"
will play on pushState. Small JS hack help with it.
.config(["$locationProvider", function($locationProvider) {
// hack for html5Mode customization
$('a').each(function(){
$a = $(this);
if ($a.is('[target]') || $a.is('[ng-href]')){
} else {
$a.attr('target', '_self');
}
});
$locationProvider.html5Mode(true);
}])