首页 > 代码库 > sencha touch规范
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规范