whats the difference between listing views in the app.js rather than a controller in sencha touch?

StackOverflow https://stackoverflow.com/questions/13654718

  •  03-12-2021
  •  | 
  •  

Question

What is the difference between list views within the view object of application set-up:

  Ext.application({
    models: [
...        
    ],
    views: [
        'Login',
        'Home       
    ],

and listing them in the config object of a controller in sencha touch?

   config: {
        views: [
            'Login',
            'View'      
        ],
Was it helpful?

Solution

From Dependencies and MVC :

The general rule when deciding where to declare each dependency is to keep your classes completely self-contained. For example, if you have a view that contains several other views, you should declare those dependencies inside the view class, not the application

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top