首页 > 解决方案 > 如何在 SAPUI5 中使用 js 实例化视图并将其添加到路由器

问题描述

是否可以在 SAPUI5 中使用 js 实例化视图并将其添加到路由器?

就像是:

var oView = sap.ui.core.view("<path>", "XML"); //instantiate xml view from string
oRouter.addRoute("routename", [<target-page-1", "target-page-2"], oView); //add the view to the router

谢谢!

标签: viewsapui5router

解决方案


推荐阅读