first commit
This commit is contained in:
37
webapp/Component.js
Normal file
37
webapp/Component.js
Normal file
@ -0,0 +1,37 @@
|
||||
sap.ui.define([
|
||||
"sap/ui/core/UIComponent",
|
||||
"sap/ui/Device",
|
||||
"mvcapp00124/model/models"
|
||||
], function (UIComponent, Device, models) {
|
||||
"use strict";
|
||||
|
||||
return UIComponent.extend("mvcapp00124.Component", {
|
||||
metadata: {
|
||||
manifest: "json",
|
||||
},
|
||||
|
||||
init: function() {
|
||||
// call the base component's init function
|
||||
UIComponent.prototype.init.apply(this, arguments);
|
||||
|
||||
|
||||
// enable routing
|
||||
this.getRouter().initialize();
|
||||
|
||||
// set the device model
|
||||
this.setModel(models.createDeviceModel(), "device");
|
||||
|
||||
},
|
||||
createContent: function() {
|
||||
var oViewData = {
|
||||
component: this,
|
||||
};
|
||||
|
||||
return sap.ui.view({
|
||||
viewName: "mvcapp00124.view.App",
|
||||
type: sap.ui.core.mvc.ViewType.XML,
|
||||
viewData: oViewData,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user