github.com/SAP/cloud-mta-build-tool@v1.2.27/integration/testdata/node/webapp/Component.js (about) 1 sap.ui.define([ 2 "sap/ui/core/UIComponent", 3 "sap/ui/Device", 4 "com/sap/teched/teched/model/models" 5 ], function (UIComponent, Device, models) { 6 "use strict"; 7 8 return UIComponent.extend("com.sap.teched.teched.Component", { 9 10 metadata: { 11 manifest: "json" 12 }, 13 14 /** 15 * The component is initialized by UI5 automatically during the startup of the app and calls the init method once. 16 * @public 17 * @override 18 */ 19 init: function () { 20 // call the base component's init function 21 UIComponent.prototype.init.apply(this, arguments); 22 23 // enable routing 24 this.getRouter().initialize(); 25 26 // set the device model 27 this.setModel(models.createDeviceModel(), "device"); 28 } 29 }); 30 });