0
我目前正在基於SAPUI5開發一個Web應用程序。目前它基於html頁面,但我們必須遷移到動態結構。解決方案將是路由器。我跟着教程噸(真的),嘗試了不同的結構(JS/XML視圖),但路由器返回永諾路由器不會加載視圖
The target intro has a control id or a parent but no 'controlAggregation' was set, so the target could not be displayed. - EventProvider sap.m.routing.Target
這是我目前的路由器設置:
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "xx.xxxxxxx.view",
"controlId": "appContainer"
},
"routes": [
{
"pattern": "",
"name": "intro",
"target": "intro"
}
],
"targets": {
"intro": {
"viewName": "intro"
}
}
}
的控件ID指向我的rootView中的App
標記。
我嘗試了非常簡單的視圖(如僅文本),但問題仍然存在。
<mvc:View
controllerName = "xx.xxxxxxx.controller.app"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
displayBlock="true">
<App id="appContainer"/>
</mvc:View>