I want to make a pipe available in all the app. Acording with what I read in the Angular docs and internet, if I declare a pipe into the root module declaratios, it make\'s
You need to add the module that contains the pipe (and has it in declarations: []
and exports: []
) to imports: [...]
of your current module, then it's available in the current module.
@NgModule({
imports: [ CommonModule],
declarations: [ TranslatePipe],
exports: [ TranslatePipe],
})
export class TranslateModule { }
@NgModule({
imports: [ CommonModule, TranslateModule],
declarations: [ NavbarMenuComponent]
})
export class NavbarModule { }