[BUG] Abstract components are missing from output
See original GitHub issueAbstract 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:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, @BeSpunky, fixed with next release, 1.1.12. Remove the @directive for both failing files LocalizedRouteAware and RouteAware
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 theInjectables
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 🥂