mmRouter icon indicating copy to clipboard operation
mmRouter copied to clipboard

mmRouter 的 html5model 问题

Open XylitolLin opened this issue 9 years ago • 0 comments

<li><a href="#/"></a></li> //1
<li><a href="#/a"></a></li> //2
<li><a href="#/b"></a></li> //3

<script>
  var callback = function () {
     console.log(this);
  }
  avalon.router.get("/:status", callback);
  avalon.history.start({
     basepath: "/",
     html5Mode: true
  });
</script>

你好,我在使用 mmRouter(最新代码) 的时候,发现开启 html5Mode 后,点击 2 或者 3 链接都没有问题,但是在 2 或 3 链接下,即地址栏为:localhost/index.html/a 或者 localhost/index.html/b 时,点击 1 链接,地址没有按照预期改变为:localhost/index.html ,而仍然是 localhost/index.html/a 或者 localhost/index.html/b ,并且触发了一次对应的 callback。关闭 html5Mode 后一切正常。用的是 avalon.modern.shim.js(最新代码), chrome 41(mac)

XylitolLin avatar Apr 14 '15 07:04 XylitolLin