1

For ex:

ObjectModule --> createModule --> render all attributes and input elements.

But my requirement:

When I am clicking a button in the same page it needs to open:

Button (click)--> objectModule -> createModule. But it's throwing a warning message:

WARNING in Circular dependency detected: src/app/common/object/object/object.create.module.ts -> src/app/common/create/create.module.ts -> src/app/common/object/object/object.create.module.ts

1
  • As the error tells, you have a circular dependency (for instance module A needs Module B, and module B needs module C, and module C need module A). Without your showing how your modules are defined and import each other, that would be hard to tell more on how to restructure your code to avoid this. Commented Sep 27, 2018 at 13:19

1 Answer 1

1

You have this error because:

  • object.create.module.ts is importing create.module.ts
  • create.module.ts is importing object.create.module.ts

This is called a circular dependency and is not allowed.

If you have components declared in one of the modules that both modules need than these could be separated out into a third module and then both modules could import the new module which would break the circular problem.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.