Here is my solution:
MyFactory = ->
test: -> "test"
class Base
@$inject: ["MyFactory"]
constructor: -> return (@MyFactory) => @
restrict: "E"
link: (scope, element, attr) =>
scope.test = @test()
class MyDirective extends Base
test: -> @MyFactory.test()
angular.module("app", []).factory("MyFactory", MyFactory).directive("myDirective", new MyDirective)
I do feel like it's a little twisted, but could not find anything better, has anyone a better idea?