AngularJS, using routes without refreshes on back button

前端 未结 3 1919
名媛妹妹
名媛妹妹 2021-02-14 09:17

I\'m using angularJS to build a simple single page application using AJAX, but I\'m running into a problem when users use the native back button.

an         


        
3条回答
  •  我在风中等你
    2021-02-14 09:58

    if your parameter 'id' in the route contains any character that is being decoded during the http request (like ' ' => '%20') then your route will not work. try to perform encodeURIComponent() on your string before using it for the routing.

提交回复
热议问题