Sapui5 如何将html页面包含到页面内容中?
我的目标是在sap.m.页面中包含一个文档页面。 我有一个sap.m.Page到XML视图:Sapui5 如何将html页面包含到页面内容中?,sapui5,Sapui5,我的目标是在sap.m.页面中包含一个文档页面。 我有一个sap.m.Page到XML视图: <Page id="idPageSidebar" title="" showNavButton="false" navButtonPress="doBack"> <content> //here I want visualize myDocumentation.html page </content>
<Page id="idPageSidebar" title="" showNavButton="false" navButtonPress="doBack">
<content>
//here I want visualize myDocumentation.html page
</content>
</Page>
//这里我想要可视化myDocumentation.html页面
我已将myDocumentation.html放入我的项目目录中。
如何将其包含到sap.m.Page中?使用core:HTML控件并通过AJAX添加内容 这里有一个例子:
<App>
<Page title="SAPUI5 App">
<core:HTML id="html" content="hello"/>
</Page>
</App>
sap.ui.controller("my.own.controller", {
onInit: function(){
var that=this;
$.get( "/8rmAU/show/light", function( data ) {
that.getView().byId('html').setContent(data);
});
}
});