In v15 I bootstrap the app component using bootstrapApplication
.
Inside the ts
I import AppHeaderComponent
and write it in imports
section.
The AppHeaderComponent
inject foo = inject(FooService);
.
The FooService
is inject BazPipe
.
BazPipe
is contain the following pipe (with standalone is true):
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'baz',
standalone: true,
})
export class BazPipe implements PipeTransform {
constructor() {}
transform(value) {
return value;
}
}
Why angular throw error in the console?
ERROR
Error: R3InjectorError(Environment Injector)[FooService -> BazPipe -> BazPipe]:
NullInjectorError: No provider for BazPipe!