first commit
This commit is contained in:
35
webapp/Component.js
Normal file
35
webapp/Component.js
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* eslint-disable @sap/ui5-jsdocs/no-jsdoc
|
||||
*/
|
||||
|
||||
sap.ui.define([
|
||||
"sap/ui/core/UIComponent",
|
||||
"sap/ui/Device",
|
||||
"restaurant/z00124ss25restaurant/model/models"
|
||||
],
|
||||
function (UIComponent, Device, models) {
|
||||
"use strict";
|
||||
|
||||
return UIComponent.extend("restaurant.z00124ss25restaurant.Component", {
|
||||
metadata: {
|
||||
manifest: "json"
|
||||
},
|
||||
|
||||
/**
|
||||
* The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
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");
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user