2017-04-17 64 views
0

我想路由到SAPUI5中的頁面,但不是所有頁面。所以,我想要爲內容進行路由,在圖片中排除標題(下拉菜單)。如何路由分離的頁面?內容路由SAPUI5

page

感謝所有。 鮑比裏面的內容

回答

0

XML代碼

   <App id="navCon"> 
        <pages> 
         <Page id="contentOne" showHeader="false"> 
          <Text text="page 1 content"/> 
          <Button text="Next Content" press="nextContent"></Button> 
         </Page> 
         <Page id="contentTwo" showHeader="false"> 
          <Text text="page 2 content"/> 
           <Button text="Previous Content" press="prevContent"></Button> 
         </Page> 
        </pages> 
       </App> 

控制器代碼

onInit : function(){ 
      this.navCon = this.getView().byId("navCon");  
    }, 
    nextContent : function(){ 
     this.navCon.to(this.getView().byId("contentTwo"), "slide"); 
    }, 

    prevContent : function(){ 
     this.navCon.to(this.getView().byId("contentOne"), "slide"); 
    } 

將根據您的需要的代碼和功能是相同的。