-
Notifications
You must be signed in to change notification settings - Fork 0
/
Component.js
35 lines (31 loc) · 872 Bytes
/
Component.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
sap.ui.define([
'sap/ui/core/UIComponent',
'sap/ui/core/IconPool',
'./model/models',
'./util/themeHelper',
'./util/languageHelper'
], function (UIComponent, IconPool, models, themeHelper, languageHelper) {
'use strict';
return UIComponent.extend('pharelyshau.Component', {
metadata: {
interfaces: ['sap.ui.core.IAsyncContentCreation'],
manifest: 'json'
},
init() {
UIComponent.prototype.init.call(this);
languageHelper.initLanguage();
themeHelper.initTheme();
this.getRouter().initialize();
this.loadFioriIcons();
this.setModel(models.createDeviceModel(), 'device');
this.setModel(models.createAppModel(), 'app');
},
loadFioriIcons() {
const oFioriIconsFont = {
fontFamily: 'SAP-icons-TNT',
fontURI: sap.ui.require.toUrl('sap/tnt/themes/base/fonts/')
};
IconPool.registerFont(oFioriIconsFont);
}
});
});