2

RC6. Using modal component from ng2-bootstrap. Was working fine until I separated the application into modules. Now in lazy loaded module when I try to call .show() method of the modal component I'm getting an error: No provider for AppComponent!

As you may guessed the AppComponent is my main/default component in the app root module. How does this modal thing even know about AppComponent existence?

Thanks!

1 Answer 1

1

Because of this hack to get root app component:

https://github.com/valor-software/ng2-bootstrap/blob/development/components/utils/components-helper.service.ts#L41-L49

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

3 Comments

Thanks, Do you know if there's an ETA on fixing this?
Reason found, working on solution (have couple of ideas), need to test them on failing sample
My project is quite large and complicated to publish on plunker I can try if you give me your changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.