Using a Typescript class looking something like this:
class MainCtrl {
constructor() {
var vm = this;
vm.variable = "Text";
}
}
app.controller("MainCtrl", MainCtrl);
Compiles to
var MainCtrl = (function () {
function MainCtrl() {
var vm = this;
vm.variable = "Text";
}
return MainCtrl;
})();
app.controller("MainCtrl", MainCtrl);
And since I have not quite grasped IIFE's yet, I cant read from this if the MainCtrlobject is a function I can shove into the controller definition like this or not. And how would I handle injections?