I am having a problem with the routing. Navigation is successful to a childview like oRouter.navTo('child') .... but when the application goes to the child's controller ... well I cannot access child's View in the init function.
this.getView() fails as it does not have it ...perhaps loaded yet? in the console when I debug it does not exist... Uncaught TypeError: this.getView is not a function
but if I use console.log to write it I can see that it's there?!:
I don't understand what's happening here as I also have another navigation to another, different view and it works there perfectly.
I tried setting the routing to async: false but it did not help...
Manifest snippet:
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"async": false,
"viewPath": "namespace.view",
"controlAggregation": "pages",
"controlId": "myApp",
"clearControlAggregation": false
"routes": [{
"name": "TargetMain",
"pattern": "",
"target": "TargetMain"
}, {
"name": "toEmpty",
"pattern": "child1",
"target": "toEmpty"
}, {
"name": "child2",
"pattern": "child2",
"target": "child2"
}, {
"name": "toError",
"pattern": "child3",
"target": "child3"
},
}],
"targets": {
"TargetMain": {
"viewType": "XML",
"transition": "page",
"clearControlAggregation": false,
"viewName": "Main",
"viewLevel": 1
},