PDA

View Full Version : why controller path not fully specified?



bluesky100
15 Jun 2016, 1:10 PM
In one of tutorials there is such code



Ext.application (http://docs.sencha.com/extjs/4.1.3/#%21/api/Ext-method-application)({ ... controllers: [ 'Users' ], ... });

where Users controller is defined inside app/controller/user.js

My question is why above only as controller name Users is mentioned? why not full path?

joel.watson
22 Jun 2016, 9:53 AM
Hi--

Because that class exists in the convention location for controllers, the application knows how to discover it automatically and allow you to reference it in that shortened form.

Thanks
Joel

bluesky100
22 Jun 2016, 1:26 PM
Hi--

Because that class exists in the convention location for controllers, the application knows how to discover it automatically and allow you to reference it in that shortened form.

Thanks
Joel

How is it with different versions with extJS then, AFAIK extjs 5 say and extjs 4 have different convention locations for models views and controllers (or I am wrong?)?