大佬教程收集整理的这篇文章主要介绍了Angular 7 ngx-bootstrap 3.1.3,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
但是当我更新到角度7时,它说模块未找到:错误:无法解析’ngx-bootstrap / modal / bs-modal-ref.service’.
在stackblitz中,它要求我安装ngx-bootstrap,但我已经安装了.
任何的想法?
至
那么你将不得不在app.module中提供提供者
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { BsModalRef } from 'ngx-bootstrap'; import { AppComponent } from './app.component'; import { HelloComponent } from './Hello.component'; import { ModalModule } from 'ngx-bootstrap/modal'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; @NgModule({ imports: [ BrowserModule,FormsModule,ModalModule.forRoot(),BsDropdownModule.forRoot() ],declarations: [ AppComponent,HelloComponent ],bootstrap: [ AppComponent ],providers: [BsModalRef] }) export class AppModule { }
以上是大佬教程为你收集整理的Angular 7 ngx-bootstrap 3.1.3全部内容,希望文章能够帮你解决Angular 7 ngx-bootstrap 3.1.3所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。