Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No provider for BsModalService, what I need to change?

Tags:

angular

usermodule.ts

Imports:

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { UsersRoutingModule } from './users-routing.module';
import { UserListComponent } from './user-list/user-list.component';
import { ModalModule } from 'ngx-bootstrap/modal';


@NgModule({
 declarations: [UserListComponent],

Should I add some in imports?

   imports: [
    CommonModule,
    BrowserModule,
    UsersRoutingModule,
    ModalModule.forRoot()
   ],

Should I add some in providers?

  providers: 
 })
  export class UsersModule { }
like image 513
anchy17 Avatar asked Oct 27 '25 02:10

anchy17


1 Answers

You need to add a provider for BsModalService

providers: [BsModalService]
like image 148
Mick Avatar answered Oct 28 '25 18:10

Mick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!