NgbModal not opening modal from component included in another component

前端 未结 2 1459
旧巷少年郎
旧巷少年郎 2021-01-15 13:14

I\'m using Anuglar 6

I have two components account and profile. account component is added to the app

相关标签:
2条回答
  • 2021-01-15 13:21

    This is a big of a vague guess but you probably need to import the NgbModule like so in your app.module.ts

    import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
    
    @NgModule({
      imports: [
        NgbModule.forRoot()
      ]
    })
    

    That should then fix the error you're running into.

    0 讨论(0)
  • 2021-01-15 13:39

    it's working for me by adding NgbModule at my module file.

    import {  NgbModule } from '@ng-bootstrap/ng-bootstrap';
    
    
    @NgModule({
         imports: [...
         NgbModule,
          ....],
         declarations: [],
         entryComponents: [...]
         })
    
    0 讨论(0)
提交回复
热议问题