Hi Jay.
In the App.Controller.js (open App.view.html and click on source) change the default navToHandler function to:
navToHandler : function(channelId, eventId, data) {
if (data && data.id) {
if (this.app.getPage(data.id) === null) {
this.app.addPage(sap.ui.htmlview(data.id, "view." + data.id));
SAP.Util.decorateView(this.app);
}
this.app.to(data.id, data);
} else {
jQuery.sap.log.error("nav-to event cannot be processed. Invalid data: " + data);
}
},
And then you can use the event bus like this:
onButtonPress: function(evt) {
var bus = sap.ui.getCore().getEventBus();
bus.publish("nav", "to", { id : "newPage" });
},
Regards,
Charl