怎样开发单页面app

   groot.view("myview", function (vm, ve) {
        ve.loada = function () {
            require("./app/pagea.js").loadpage($("#app"), "myapp")
        }
        ve.loadb = function () {
            require("./app/pageb.js").loadpage($("#app"), "myapp")
        }
    })
exports.loadpage = function (element, id) {
var html = require("./pageb.html!text");
groot.createElement(html, id,element);
var moudle = groot.view(id, function (vm, ve) {
ve.hello = function () {
alert("bbb");
}
}
)
}

请上官网,下载单页面引用的demo

posted @ 2014-06-13 11:47  吹鱼算法  阅读(278)  评论(0编辑  收藏  举报