Skip to Content
0

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

Mar 28, 2017 at 03:09 PM

82

avatar image

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");
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Mahesh kumar palavalli Mar 28, 2017 at 04:06 PM
0

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);
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Mahesh , its working

1