I am using Typescript with Angular as described here http://www.youtube.com/watch?v=WdtVn_8K17E
class MyController {
thescope: any;
static $inject = ['$scope'];
constructor($scope) {
$scope.vm = this;
this.thescope = $scope;
}
...
}
I want to create an instance of this controller. What do I have to use as the $scope parameter?
var mc = new MyController(whatParameterHere?); //
nodeselected
event where I want to call a function of the controller. Maybe I have wrong design? – zoidbergi Aug 14 '13 at 8:30init
function on the controller and bind it to ng-init. I then create the jQuery component (jstree) in the init function. If the jsTree has an event then you should be able to wire up that event inside the controller and call whatever controller based function you wish. Without code, it is hard to give you a proper solution. – gregpakes Aug 14 '13 at 8:52