xiaolizi007
11/22/2016 - 6:56 AM

From http://wiki.jikexueyuan.com/project/kendo-ui-development-tutorial/the-router-class-single-page-applications.html Route 类负责跟踪应用的当前状态和支持在

From http://wiki.jikexueyuan.com/project/kendo-ui-development-tutorial/the-router-class-single-page-applications.html Route 类负责跟踪应用的当前状态和支持在应用的不同状态之间切换。Route 通过 Url 的片段功能(#url)和流量器的浏览历史功能融合在一起。从而可以支持把应用的某个状态作为书签添加到浏览器中。Route 也支持通过代码在应用的不同状态之间切换


<script>
    var router = new kendo.Router();

    router.route("/", function() {
        console.log("/ url was loaded");
    });

    $(function() {
        router.start();
    });
</script>