question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Abstract components are missing from output

See original GitHub issue

Abstract components are not included by compodoc. Is it because they are not added to a Module perhaps? After Ivy, ng 9+, we have to decorate anything that is component-like with a Directive attribute.

Anyway it can’t be added to a module. Is there a way around this?

/**
* abstract components are not included
*/
@Directive()
// tslint:disable-next-line:directive-class-suffix
export abstract class AbstractComponent implements OnInit {
  ngOnInit() {}
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vogloblinskycommented, Jul 7, 2021

Ok, @BeSpunky, fixed with next release, 1.1.12. Remove the @directive for both failing files LocalizedRouteAware and RouteAware

1reaction
BeSpunkycommented, Nov 15, 2020

Found a possible workaround:

Decorate your abstract class as BOTH @Injectable() and @Directive(). Angular doesn’t complain, my tests keep passing and the class appears in the Injectables section.

❕ Not sure if there are any Angular side effects for a class decorated with both. In a small POC stackblitz I made everything worked as expected, no errors, nothing breaks. Please comment if you know of any side effect.

Cheers 🥂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class is using Angular features but is not decorated. Please ...
I was getting that error for 3rd party libraries and for all my Angular components even though they were decorated. If you're having...
Read more >
Detecting Missing Information in Bug Descriptions
Based on these findings, we designed and evaluated an automated approach to detect the absence (or presence) of EB and S2R in bug...
Read more >
Missing @Directive()/@Component() decorator migration
This migration adds an empty @Directive() decorator to undecorated base classes that: Use Angular features; Are extended by directives or components.
Read more >
PP46697: COMMA MISSING IN DFLD OUTPUT FROM RULES ... - IBM
THE MFS DFLD THAT IS GENERATED OVERLAYS THE ',' AFTER THE TRANSACTION NAME WITH THE CONTINUATION CHARACTER 'C'. THIS RESULTS IN MFS ERROR...
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
This class inherits equals(Object) from an abstract superclass, and hashCode() from java.lang.Object (which returns the identity hash code, an arbitrary ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found