怎样开发单页面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