적절한 MVC 구조를 사용하여 OpenUI5에서 간단한 Hello World App을 작성하려고합니다. SplitApp이 아닌 sap.m.App를 사용하고 있습니다.Sapui5- 페이지가 표시되지 않습니다.
routing : {
config : {
viewType : "XML",
viewPath : "./view",
targetControl : "targetAppId",
clearTarget : false,
transition : "slide"
},
routes : [{
pattern : "",
viewType : "XML",
name : "splash",
view : "splash",
viewPath : "./view",
viewLevel : 0,
}
]
}
}
모두 내 App.view.js 및 splash.view : 나는 다음과 같은 코드를 작성하고 라우팅, 내 구성 요소에서
....
createContent : function(oController) {
this.setDisplayBlock(true);
this.app = new sap.m.App("targetAppId", {
});
return this.app;
}
....
: 그래서 내 App.view.js은 다음과 같습니다 .xml은 ./view에 있습니다. - 실행에
<mvc:View xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m" >
<Page
showHeader="true">
<content>
<Text text="Hello"/>
</content>
</Page>
</mvc:View>
내가 빈 블루 컬러 화면을 얻을
createContent : function() {
var oView = sap.ui.view({
id : "app",
viewName : "./view.App",
type : "JS",
viewData : {
component : this
}
});
return oView;
}
splash.view.xml : 내 component.js에서
내가보기를로드하려면 다음 코드를 썼다. 어떤 이유로 그것은 splash.view.xml로 이동하지 않습니다. 나는 이유를 모른다. 도와주세요.
편집 :
내가 sap.m.SplitApp에 sap.m.App을 변경하고 targetAggregation 추가하는 경우 : "masterPages을". 모든
UPDATE 작동 : "페이지"나는 targetAggregation을 변화 무슨 짓을
. 모든 것이 잘 작동합니다. 이 글을 쓰면 누군가를 도울 수 있습니다.