mmRouter
mmRouter copied to clipboard
avalon.router.getLastPath()的问题
<a href="#/a">没有感叹号</a> //可以成功获取最后访问的地址
<a href="#!/a">有感叹号</a> //不成功!!!!!
<script>
var callback = function () {
console.log(this.params.status);
}
avalon.router.get("/:status", callback);
var lastPath = avalon.router.getLastPath();
avalon.history.start({
basepath: "/"
});
avalon.router.navigate('/' + lastPath);
</script>
你好,我在使用 mmRouter
的时候发现以上问题,avalon.router.getLastPath()
只能对 <a href="#/a">
成功执行,用 #!/
不能成功返回值。
多谢提供问题。即将修复。 但是要注意,这种混用的方式本身是不建议的,统一用!或者不用