标签:pattern app 视图 UI5 Routing routes SAP orders 路由
官网链接:https://sapui5.hana.ondemand.com/1.36.6/docs/guide/e5200ee755f344c8aef8efcbab3308fb.html
一个例子:
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "kyma.sample.app.view",
"controlId": "app",
"controlAggregation": "pages",
"async": true
},
"routes": [
{
"pattern": "",
"name": "orders",
"target": ["orders"]
}
],
"targets": {
"orders": {
"viewName": "Orders",
"viewId": "orders",
"viewLevel": 1,
"title": "{i18n>title}"
}
}
在 manifest.json 文件的 sap.ui5 区域,添加了三个子区域:
(1) config
(2) routes
(3) target
config
This section contains the global router configuration and default values that apply for all routes and targets.
包含了全局路由器信息和适应于所有路由路径和目标的默认值。
We define the router class that we want to use and where our views are located in the app.
定义了路由器实现类以及我们的视图在应用中的具体位置。
To load and display views automatically, we also specify which control is used to display the pages and what aggregation should be filled when a new page is displayed.
为了让视图能够显示出来,需要定义哪个控件用于显示页面,以及页面通过何种 aggregation,填充到该控件去。
routes
Each route defines a name, a pattern, and one or more targets to navigate to when the route has been hit.
每条路由信息定义了一个名称,一个格式,以及一个路由目的视图,当该路由触发时,目的视图会显示。
The pattern is basically the URL part that matches to the route, we define two routes for our app.
所谓 pattern,即待匹配的 URL 片段。
例子:
更多Jerry的原创文章,尽在:“汪子熙”:
标签:pattern,app,视图,UI5,Routing,routes,SAP,orders,路由 来源: https://blog.csdn.net/i042416/article/details/117868821
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。