Angular 2 angular-cli AOT declare abstract class in module? Angular 2 angular-cli AOT declare abstract class in module? angular angular

Angular 2 angular-cli AOT declare abstract class in module?


Remove the @Component decorator from the abstract class, replacing it with an @Injectable() decorator.


Yes.. It is true that if you create a abstract class and try using it as a directive controller, it will not work the reason is here at the documentation

Highlighted part of the documentation as below enter image description here

When ever you create a directive the Angular creates a new instance of the directive's controller class. When you use an abstract class, you cannot have instance for it and hence it fails in your case