How to declare a pipe globally to use in different modules?

后端 未结 5 1900
鱼传尺愫
鱼传尺愫 2020-12-02 15:29

I have a custom pipe named CurrConvertPipe

import {Pipe, PipeTransform} from \'@angular/core\';
import {LocalStorageService} f         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 15:47

    If you generate a pipe using CLI for a shared module you will need to add the pipe to the 'exports' list manually. My pipe error'd in the browser until I added the pipe as an export in my shared module I imported/declared it in.

提交回复
热议问题