gpt4 book ai didi

javascript - Angular2 的 NgbModule ng-bootstrap 不起作用

转载 作者:行者123 更新时间:2023-12-03 04:10:32 25 4
gpt4 key购买 nike

将其导入到 app.module.ts 中,例如,

import {NgbModule} from '@ng-bootstrap/ng-bootstrap';

添加到:

imports:[NgbModule.forRoot()]

WARNING in ./~/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.js 188:12-21 "export 'Renderer2' was not found in '@angular/core'

WARNING in ./~/@ng-bootstrap/ng-bootstrap/modal/modal-window.js 61:12-21 "export 'Renderer2' was not found in '@angular/core'

WARNING in ./~/@ng-bootstrap/ng-bootstrap/popover/popover.js 119:12-21 "export 'Renderer2' was not found in '@angular/core'

WARNING in ./~/@ng-bootstrap/ng-bootstrap/buttons/radio.js 108:12-21 "export 'Renderer2' was not found in '@angular/core'

编译时这样说,我的代码有什么问题吗?

最佳答案

我浪费时间从 Angular 版本解决这个问题。执行以下步骤:

  1. 卸载当前的@ng-bootstrap:npm uninstall @ng-bootstrap/ng-bootstrap
  2. package.json 中更改此行:"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.24"
  3. 运行:npm install

关于javascript - Angular2 的 NgbModule ng-bootstrap 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44352563/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com