37 lines
951 B
JavaScript
37 lines
951 B
JavaScript
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,
|
|
});
|
|
}
|
|
});
|
|
}); |