cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass data from one view to another view, using target for Navigation

Former Member
0 Kudos
426

Hi ,

I'm using the following code to navigate from one view to another.

How do i pass data using this and how to receive it in the next view

this.getRouter().getTargets().display("view2");

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor

Hi,

Please check the below reference code:

View 1:

this.getRouter().getTargets().display("targetName",{
				param1 :"test1"});

View 2 init code:

oTarget = oRouter.getTarget("targetName");
oTarget.attachDisplay(function(oEvent){

    var oPassedData = oEvent.getParameter("data"); // you will get data here

},this);
Former Member

Thanks Mahesh , its working

Answers (0)