lynxSven
lynxSven

Reputation: 594

Angular 5 Shared module, shared modules want to use pipes

I have one sharedmodule which exports differnt modules, components and pipes to the rest of the modules in the application.

This works quite well, BUT(!!!) I have the problem I can't get my head around.

I have a module which uses a pipe which is declarated in the shared module. The module is imported in the sharedmodule.

sharedmodule:

imports: [
moduleOne
],
declarations:[
pipeShared
],
exports:[
moduleOne
pipeShared
]

Now I cant declare the Pipe in moduleOne, but also can't import sharedModule in moduleOne.

Upvotes: 1

Views: 1731

Answers (1)

moohkooh
moohkooh

Reputation: 927

as i know, there is no way to use a component/pipe from a module where im important e.g. Module A, Module B. Module A provides pipies. Module B is important ind Module A. Module B can´t use pipes from Module A. I think you need to create a "shared" module.

Upvotes: 1

Related Questions