[英]NgbModule ng-bootstrap for angular2 not working
將其導入到app.module.ts中,例如
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
在以下位置添加:
imports:[NgbModule.forRoot()]
./~/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.js 188中的警告:“在'@ angular / core'中找不到導出'Renderer2'
在./~/@ng-bootstrap/ng-bootstrap/modal/modal-window.js中警告61:12-21“在'@ angular / core'中找不到導出'Renderer2'
./~/@ng-bootstrap/ng-bootstrap/popover/popover.js中的警告119:12-21“在'@ angular / core'中找不到導出'Renderer2'
./~/@ng-bootstrap/ng-bootstrap/buttons/radio.js中的警告108:12-21“在'@ angular / core'中找不到導出'Renderer2'
在編譯其內容時,我的代碼有什么問題?
我浪費時間從Angular版本解決此問題。 請執行以下步驟:
@ng-bootstrap
: npm uninstall @ng-bootstrap/ng-bootstrap
package.json
此行: "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.24"
npm install
請更新到最新版本的Angular CLI,然后您將不會收到此錯誤,我嘗試過,它可以正常工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.