Skip to Content
0
May 16, 2016 at 06:53 AM

Get the previous page id when navigating to new view

1891 Views

Hi,

I want to get the previous page id when navigating to new view. I have to implement a logic depending on the previous view. I attach the "PatternMatched" event and tried to use oEvent parameter in that event. But I couldn't figure it out how to get the id or the name of the previous view.

this.getRouter().getRoute("object").attachPatternMatched(this._onObjectMatched, this);

_onObjectMatched: function(oEvent) {
     //tried to use oEvent. But couldn't figure out.
     //then I tried to use the following. But still no luck...
     var sPreviousHash = History.getInstance().getPreviousHash(); //this doesn't give anything close to what I want.
}