I am trying to use a custom channel in my project Angular 4. I canβt understand why the compiler does not recognize my pipe in the component template.
QFormat handset
@Pipe({ name: 'qFormat'})
export class QFormatPipe implements PipeTransform {...}
Sharedmodule
@NgModule({
declarations: [QFormatPipe],
exports: [QFormatPipe]
})
export class SharedModule { }
Featuremodule
@NgModule({
imports: [SharedModule],
declarations: [MyComponent]
})
export class FeatureModule{ }
MyComponent.html
<div>{{someProp | qformat}}</div>
^^^^^^^
The pattern causes an error:
Angular: could not find 'qformat' pipe
Did I miss something?
source
share