Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bsModal is missing #1027

Closed
harishrohokale opened this issue Sep 25, 2016 · 6 comments
Closed

bsModal is missing #1027

harishrohokale opened this issue Sep 25, 2016 · 6 comments

Comments

@harishrohokale
Copy link

Hi,

I did install ng2-bootstrap with version 1.1.5 and I am getting below error because of bsModal directive is missing in /component/modal/modal.component.ts

Below is the error message which i am getting :

zone.js?1474796609884:344 Unhandled Promise rejection: Template parse errors:
There is no directive with "exportAs" set to "bs-modal" ("<div bsModal [ERROR ->]#lgModal='bs-modal' class='modal fade' tabindex='-1' role='dialog' aria-labelledby='myLargeModalLabel"): ModalComponent@0:13
There is no directive with "exportAs" set to "bs-modal" ("

Can someone please help me on this?

@Confusedfish
Copy link
Contributor

Did you import the ModalModule into your app.module? i.e.:

import { ModalModule } from 'ng2-bootstrap/ng2-bootstrap';
...
@NgModule({
bootstrap: [App],
declarations: [
App,
],
imports: [
....
ModalModule
...

@Lightw3ight
Copy link

Im having the same issue and I have imported the ModalModule in my app module

@Confusedfish
Copy link
Contributor

Can you put your code up somewhere to review? Or a plunkr?

@harishrohokale
Copy link
Author

I have added ModalModule and now Its working!

@Lightw3ight
Copy link

Turns out I had imported ModalModule in my app module and not in the child module that actually uses the modal, changed that and its working fine :)

valorkin pushed a commit that referenced this issue Nov 4, 2016
Given issues #1027 and #1143, ModalModule import instructions should indicate where to import the module.
@capitalch
Copy link

I had the same issue. Then I imported the "ModalModule" in app.module.ts as explained above. This solved my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants