I currently have 2 profiles: Tablet and Phone.
Each profile loads in a different view like so:
Ext.define('Myapp.view.tablet.Login', {
extend: 'Ext.Panel',
alias: 'widget.loginview',
...
}
However in the app bootstrap code, I have these lines:
var loginView = Ext.create('MyApp.view.Login')
Ext.Viewport.add(loginView);
This won’t work as my views are now split by profile. How do I now request the login view which has been loaded by the profile? I don’t want to do this:
var loginView = Ext.is.os.Phone? Ext.create('MyApp.view.phone.Login') : Ext.create('MyApp.view.tablet.Login')
as I thought that was the whole point of having profiles.
This is not how you should detect a profile.
Take a look at my answer here : Loading different views for different profiles
Hope this helps