Skip to Content
0
Former Member
Sep 30, 2013 at 07:41 AM

app is undefined

34 Views

Hi

I'm trying to make my hybrid web container app move to the next view/page when a button is clicked. I have had a look at some sample code as follows -

This is inside the sample controller.js file -

productListTap : function(evt) {

var data = {};

data.context = evt.getSource().getBindingContext();

var app = this.getView().app;

app.to("ProductDetail", data);

},

This is my controller code -

moveToNextViewTap : function(evt)

{

var app = this.getView().app;

app.to("EndView");

},

I have debugged this in chrome and find that my 'app' variable is undefined and therefore does not do anything. I cant figure out why though.

What is missing?

Regards

Riaz