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

上一篇:软件工程HW1-四则运算软件


下一篇:2014 Super Training #7 C Diablo III --背包问题(DP)