i'm updating app use module structure , ran weird issue when trying add pipe component shared module. i've read have set right, must missing little.
error: unhandled promise rejection: template parse errors: pipe 'cmgtitleize' not found
i have browsemodule
, module declares projectcardcomponent
has template uses cmgtitleize
pipe. provide access titleizepipe
import sharedmodule
.
@ngmodule({ declarations: [ ..., projectcardcomponent ], imports: [ ..., sharedmodule ], providers: [ ... ] }) export class browsemodule { }
the sharedmodule
, imports pipesmodule
:
@ngmodule({ declarations: [ ... ], exports: [ ... ], imports: [ ..., pipesmodule ] }) export class sharedmodule { }
pipesmodule
declares , exports titelizepipe
:
@ngmodule({ declarations: [ ... titleizepipe ], exports: [ ... titleizepipe ] }) export class pipesmodule { }
lastly sanity check heres titleizepipe:
@pipe({ name: 'cmgtitleize' }) export class titleizepipe implements pipetransform { ... }
looks needed export pipesmodule
in sharedmodule
Comments
Post a Comment