Updating URL in Angular JS without re-rendering view

前端 未结 9 1883
情书的邮戳
情书的邮戳 2020-12-04 08:33

I\'m building a dashboard system in AngularJS and I\'m running into an issue with setting the url via $location.path

In our dashboard, we have a bunch o

9条回答
  •  清歌不尽
    2020-12-04 08:56

    Below code will let you change url without redirection such as: http://localhost/#/691?foo?bar?blabla

    for(var i=0;i<=1000;i++) $routeProvider.when('/'+i, {templateUrl: "tabPages/"+i+".html",reloadOnSearch: false});
    

    But when you change to http://localhost/#/692, you will be redirected.

提交回复
热议问题