2016-06-28 88 views
0

有办法过滤窗口历史吗?当我从一个页面移动到另一个,然后在历史上有这样的AngularJS管理历史

[http://localhost:8080/#/reports/historical?userId=62&tradingDeskId=1&bookingId=1&multiple=false#%253A%255B%25221%2522%255D%252C%2522....]

差异相似的国家不仅是最后的主题标签后部分,其中存在序列化JSON对象。当我按回到浏览器的按钮,我需要点击多次(4-5),以获得前一页,因为在历史上

- url#hash1 
- url#hash2 
- url#hash3 
- url#hash4 
- url1#hash 
- url2#hash 

但是URL相同

我怎样才能创造历史到

- url#hash 
- url1#hash 
- url2#hash 

回答

0

不幸的是,我不能使用一个更多的依赖和...我认为什么不明确描述这个问题。

这里是例如URL的:

http://localhost:8080/#/products/statistics?arg1=62&arg2=1&arg3=3&arg4=6183#[very-log-hash]

当我从第1页第2页(上述网址)移动,然后在窗口的历史大约四个记录有相同的URL ,但不同很日志哈希象下面这样:

.../#/products/statistics?arg1=62&arg2=1&arg3=3&arg4=6183#hash1... 
.../#/products/statistics?arg1=62&arg2=1&arg3=3&arg4=6183#hash2... 
.../#/products/statistics?arg1=62&arg2=1&arg3=3&arg4=6183#hash3... 
.../#/products/statistics?arg1=62&arg2=1&arg3=3&arg4=6183#hash4... 

要设置这个哈希使用$的location.hash(PARAMS)

当我按下浏览器后退按钮 - 什么也没有发生,因为URL留一样的,只是散改变,例如从... hash4我已经搬到... hash3等等。

我该如何解决这种情况?我已经在听众中尝试了清晰的历史,但没有成功。