<!doctype html> <html> <head> <script src="https://sapui5.netweaver.ondemand.com/sdk/resources/sap-ui-core.js" data-sap-ui-libs="sap.m" data-sap-ui-theme="sap_bluecrystal"> </script> </head> <body> <div id="content"></div> </body> </html>
var oApp = new sap.m.App(); var oPage1 = new sap.m.Page("page1Id",{ title: "Hi this is first page", content: [ new sap.m.Button({ text: "Go to 2nd Page" , press: function(){ oApp.to("page2Id"); }}) ] }); oApp.addPage(oPage1); var oPage2 = new sap.m.Page("page2Id",{ title: "This is second page", showNavButton: true, navButtonPress: function(){ oApp.back(); } }); oApp.addPage(oPage2); oApp.placeAt("content");