Created
October 25, 2019 08:58
-
-
Save mkysoft/b3f04f1ebe876712d963dcb2dfe5228b to your computer and use it in GitHub Desktop.
Change root view on app init for UI5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sap.ui.define([ | |
"sap/ui/core/UIComponent", | |
"sap/ui/Device" | |
], function(UIComponent, Device, models) { | |
"use strict"; | |
return UIComponent.extend("sap.ui.demo.myapp.Component", { | |
metadata: { | |
manifest: "json" | |
}, | |
init: function() { | |
UIComponent.prototype.init.apply(this, arguments); | |
//Change root view | |
this.getRootControl().setViewName("sap.ui.demo.myapp.view.App"); | |
this.getRouter().initialize(); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment