I\'m a relative newbie to both TypeScript and Angular so I\'m probably doing something very basic wrong here.
I\'m trying to create an abstract base class from which
//tsc writes "var _this = this;" here, but this is undefined
Two possible issues:
You should type _this
in the debug console. This is because of the way the sourcemaps work at the moment : Chrome Typescript debugging references wrong 'this'
You are registering the directive with angular in a wrong way. Note that angular will not call new on foo
if foo is used like .directive('foo',foo)
. Angular assumes its already a variable that has all the right stuff on it. Angular was not written with classes in mind (angular 1 is now fairly old).