When loading my application, I receive this error:
Uncaught TypeError: Cannot read property 'oTargetControl' of undefined"
I'm using Routing configurations (this is SAPui5 Application).
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "myNav.view",
"controlId": "app",
"controlAggregation": "pages"
},
"routes": [{
"pattern": "",
"name": "first",
"target": "first"
}, {
"pattern": "",
"name": "second",
"target": "second"
}],
"targets": {
"first": {
"viewName": "First"
},
"second": {
"viewName": "Second"
}
}
}
My Component.js Code is
UIComponent.prototype.init.apply(this, arguments);
this.setModel(models.createDeviceModel(), "device");
this.getRouter().initialize();
This is a simple navigation example and I have two Views (First and Second View).
How do I fix this?