I have this viewModel:
import app = require(\"durandal/app\"); import appViewModel = require(\"appViewModel\"); import dataService = require(\"dataService\"); c
Since you are passing the function to someone else to call in .then(this.activateView); you need to preserve the context yourself, best if you do : .then((view)=>this.activateView(view));
.then(this.activateView);
.then((view)=>this.activateView(view));
More about this : https://www.youtube.com/watch?v=tvocUcbCupA
this