PDA

View Full Version : requires syntax



r4nd7263
11 Jul 2013, 7:33 AM
The code below works, but is it considered bad practice?



requires: [
'Ext.form.*',
'Ext.field.*',
],


Also I noticed singleton objects are not declared if * is used. Should I always require individual classes and avoid using *?

mitchellsimoens
13 Jul 2013, 5:23 AM
I wouldn't do it as what if you don't use a class within that namespace? The wildcard will include all classes in the namespace. It's valid but I wouldn't do it.