Skip to content

Instantly share code, notes, and snippets.

@mkysoft

mkysoft/Component.js

Created Oct 25, 2019
Embed
What would you like to do?
Change root view on app init for UI5
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
You can’t perform that action at this time.