Open Eugeny opened 7 months ago
Why do you need Base
to be Injectable
as you can't inject it directly ? 🤔
I have a similar architecture, so I can purpose another way if you can adapt your code:
@Component({
selector: 'app-base',
template: '',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export abstract class Base {
It's a base class for both components and directives
What about an abstract directive then ?
@Directive({
standalone: true,
})
export abstract class Base {
ng-mocks is checking the decorators and will fail if there's both
@Component
and@Injectable
present. Instead, it should ignore@Injectable
if there's@Component
or@Directive
present.@Injectable
is required on base component classes to avoid theClass is using Angular features
error when inheriting, for example: