Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$location + html5 mode + legacy browser + #url('/newUrl') => full page reload #1102

@IgorMinar

Description

@IgorMinar

it seems that we do something wrong when $location is in html5 mode and we run in a browser that doesn't support history.pushState and we change url with $location#url() method.

angular.module('myApp', [])
    .config(function($locationProvider){
        $locationProvider.html5Mode(true).hashPrefix('!');
    }
);

function MyCtrl($scope, $location) {
   $scope.changeURL = function() {
        $location.path('/myPath');
  }
}
<a href ng-click="changeURL()">click here to see full page reload</a>

originally reported at: https://groups.google.com/forum/?fromgroups#!topic/angular/k-i6UYa7KpQ

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions