Hi, I have the following code. But seems like the this.get(‘controller’) is returning undefined. What is the correct way of getting a application controller from the application view.
didInsertElement: function(){
    //Add swipe listeners
    var hammertime = new Hammer(this.$()[0]);
    hammertime.get('swipe').set({ direction: Hammer.DIRECTION_HORIZONTAL });
    hammertime.on('swipe', function(ev) {
      console.log(ev);
      if(ev.direction === 4) {
        this.get('controller').send('nextPage');
      }
      else {
        this.get('controller').send('previousPage');
      }
    });