I have this viewModel:
import app = require(\"durandal/app\");
import appViewModel = require(\"appViewModel\");
import dataService = require(\"dataService\");
c
While you have your answer, the way I prefer is a bit different:
convert function/method definition - into "property referencing function"
// instead of class method
// public activateView(view) {
// use the "property"
public activateView = (view) => {
this.activeScreen(view);
}
That will reduce the need to pass explicit params like this
.then((view) => this.activateView(view))
because this will work again:
.then(this.activateView)