sencha touch规范
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sencha touch规范相关的知识,希望对你有一定的参考价值。
As you add more classes to your application, these configurations become more and more useful in helping you avoid typing out the full class names for every file. Be aware, however, that three of those configurations do more than just load files–they also do the following:
- profiles - Instantiates each Profile and determines if it should be active. If so, the Profile’s own dependencies are also loaded.
- controllers - Instantiates each Controller after loading.
- stores - Instantiates each Store, giving it a default store ID if one is not specified.
//creating a view - 2.x uses the standardized Ext.create
this.getLoginView().create();
Ext.create(‘MyApp.view.Login‘);
//getting a Model - just type out the Model name (it‘s shorter and faster)
this.getUserModel();
MyApp.model.User;
//Ext.getStore can access any Store whereas the old this.getStore only
//accessed those Stores listed in your Controller
this.getStore(‘Products‘);
Ext.getStore(‘Products‘);
//监听访问路径
routes: {
‘login‘: ‘showLogin‘,
‘user/:id‘: ‘showUserById‘
},
Before Filters
以上是关于sencha touch规范的主要内容,如果未能解决你的问题,请参考以下文章
Sencha Touch实战OA系统开发|Sencha Touch项目教程
Sencha Touch - sencha touch js 大小的性能问题
将 Sencha Architect 项目从 Sencha Touch v2.0.x 更新到 Sencha Touch 2.1.x
iPhone Sencha Touch - 如何在 sencha touch 中将表格视图添加到拆分视图