标签:
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:
//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‘
},
标签:
原文地址:http://www.cnblogs.com/dwyanezhou/p/5874269.html