1

i am getting the value of a variable var= ezLinkCard in below code in one of the view controller and want to pass or read this variable value in another view controller.How can i acheive this? your help is appriciated.

onRouteMatched: function(oEvent) {

    var oView = this.getView();
    var navigationDestinationView = oEvent.getParameter("name");
    if (navigationDestinationView === "initial" || navigationDestinationView === "initial1") {
        var ezLinkCard = oEvent.getParameter("arguments").cardNumber;
        if (ezLinkCard !== undefined && ezLinkCard !== null && ezLinkCard !== "") {
            this.getValidUserId(ezLinkCard);
        }
    }
},
Jaro
  • 1,757
  • 1
  • 15
  • 36
user10378010
  • 41
  • 2
  • 7

1 Answers1

3

There are 3 options:

  • Models
  • Event Bus
  • Parameter in your Navigation

To know which variant fits best for you and really understanding the conzepts I advice you to do follwoing tutorials for models and navigation parameter:

For understanding the event bus following question might help (or at least the answer to it):

Erch
  • 589
  • 5
  • 25