Using CalosJS
评论(0) 浏览量(202)

As I am writing, I am it quite important to write a very verbose tech article when it comes to explaining crafting things.

The CalosJS first will need to create an app object.

var app=new Calo(), then ajaxExtend(app), spaExtend(app),

sometimes, some page fields need to get rendered on load, in this case, it is like 

app.ajax(api,callback), but on initialization, I'd prefer to create a defaults object as an empty model to fill all fields, since ajax callback still happens afterwards,

and the callback method's this pointer is still the app, and after it, the model will also be rendered to the whole page again.

As to plugin, the current implementation is by using refs, when the app object is created, its refs stands for those dom containers, so, it is okay to fill any content to the refs, but maybe have to manually re-render the page model to take effect, if the page model is changed.

没有登录不能评论