In short, yes, you can extend a TypeScript class or implement an interface, and you only need to import the class in the component itself. You can even import a class from a library in your Node modules folder. But there are two things to be aware of: - you have to make sure that the dependencies are satisfied. E.g. If the abstract class takes a UserService as a constructor parameter, your module (or ultimately your root module) need to provide that service. Sounds obvious, but worth pointing out. - the bigger potential issue is that you're extending the TypeScript class, not an Angular-specific component. That means that you have to apply angular decorators to the new class (Injectable, Component etc), anything on the parent class is simply not there.
-- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
