-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComponent.js
More file actions
44 lines (44 loc) · 1.07 KB
/
Copy pathComponent.js
File metadata and controls
44 lines (44 loc) · 1.07 KB
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
36
37
38
39
40
41
42
43
44
'use strict'
jQuery.sap.require('SapUI5Tutorial.Router')
sap.ui.define(
[
'sap/ui/core/UIComponent'
],
function (UIComponent) {
return UIComponent.extend('SapUI5Tutorial.Component', {
metadata: {
routing: {
config: {
routerClass: SapUI5Tutorial.Router,
viewType: 'XML',
targetAggregation: 'pages',
clearTarget: false
},
routes: [{
pattern: '',
viewPath: 'SapUI5Tutorial.Application.Start.views',
name: 'Start',
view: 'Start',
targetControl: 'masterAppView'
}
]
}
},
init: function () {
UIComponent.prototype.init.apply(this, arguments);
this.getRouter().initialize();
},
createContent: function () {
var oViewData = {
component: this
}
return sap.ui.view({
viewName: 'SapUI5Tutorial.RootApp',
type: sap.ui.core.mvc.ViewType.XML,
id: 'app',
viewData: oViewData
})
}
})
}
)