[英]NgbModule ng-bootstrap for angular2 not working
Imported it in app.module.ts like, 将其导入到app.module.ts中,例如
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
Added it in: 在以下位置添加:
imports:[NgbModule.forRoot()]
WARNING in ./~/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.js 188:12-21 "export 'Renderer2' was not found in '@angular/core' ./~/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.js 188中的警告:“在'@ angular / core'中找不到导出'Renderer2'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/modal/modal-window.js 61:12-21 "export 'Renderer2' was not found in '@angular/core' 在./~/@ng-bootstrap/ng-bootstrap/modal/modal-window.js中警告61:12-21“在'@ angular / core'中找不到导出'Renderer2'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/popover/popover.js 119:12-21 "export 'Renderer2' was not found in '@angular/core' ./~/@ng-bootstrap/ng-bootstrap/popover/popover.js中的警告119:12-21“在'@ angular / core'中找不到导出'Renderer2'
WARNING in ./~/@ng-bootstrap/ng-bootstrap/buttons/radio.js 108:12-21 "export 'Renderer2' was not found in '@angular/core' ./~/@ng-bootstrap/ng-bootstrap/buttons/radio.js中的警告108:12-21“在'@ angular / core'中找不到导出'Renderer2'
While compiling its says this, what is wrong with my code? 在编译其内容时,我的代码有什么问题?
I waste time to resolve this issue from version of Angular. 我浪费时间从Angular版本解决此问题。 Do steps below: 请执行以下步骤:
@ng-bootstrap
: npm uninstall @ng-bootstrap/ng-bootstrap
卸载当前的@ng-bootstrap
: npm uninstall @ng-bootstrap/ng-bootstrap
package.json
: "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.24"
更改package.json
此行: "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.24"
npm install
运行: npm install
Please update into Latest Version of Angular CLI, then you won't get this error, I tried it, its working fine. 请更新到最新版本的Angular CLI,然后您将不会收到此错误,我尝试过,它可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.