I want to declare pipe in parent module and use it in child modules.
@NgModule({
// Pipe which I want to declare in all child modules
declarations: [ ThisIsPipe ],
imports: [ ChildModuleOne, ChildModuleTwo],
})
How can I use It child modules?
Because if I declare it twice I got error
Uncaught Error: Type ThisIsPipe is part of the declarations of 2 modules: ChildModuleOne and ChildModuleTwo! Please consider moving ThisIsPipe to a higher module that imports ChildModuleOne and ChildModuleTwo. You can also create a new NgModule that exports and includes ThisIsPipe then imports that NgModule in ChildModuleOne and ChildModuleTwo.