According to the Sencha Documentation here: https://docs.sencha.com/extjs/7.0.0/modern/Ext.app.Application.html we can automatically load application controllers as needed via the controllers configuration of the Ext.application() method (thus avoiding the need to include many script tags within the html) like so:
Ext.application({
name: 'App',
controllers:['Main']
});
this requires a controller like this:
Ext.define('App.controller.Main', {
//extend: 'Ext.app.ViewController',
extend: 'Ext.app.Controller'
});
And this works. However, the controllers must derive from Ext.app.Controller and can not be Ext.app.ViewController (in which case we receive error because of a missing doInit() controller method). Can anybody explain why is that? And how to instantiate an Ext.app.ViewController using the automatic loading logic?