ngx-bootstrap BsDatepickerModule 不工作

ngx-bootstrap BsDatepickerModule doesn't work

我在我的 Angular 4 项目中安装了 ngx-bootstrap v1.9.3。我试着用 BsDatepickerModule 但它对我不起作用。

此错误消息指出:

404 GET /bs-datepicker-view.html

我的项目代码:

import { BsDatepickerModule } from 'ngx-bootstrap';

@NgModule({
    imports: [BsDatepickerModule.forRoot(),...]
})

export class AppModule(){}

我自己也面临同样的错误...但是 HTML 文件在“\node_modules\ngx-bootstrap\datepicker\themes\bs\bs-datepicker-view.html”

1.Go 到此路径 "\node_modules\ngx-bootstrap\bundles\ngx-bootstrap.umd.js" 2.Search for "bs-datepicker-view.html" 在 ngx-bootstrap.umd.js 3.Change TemplateURL 位置路径从'./bs-datepicker-view.html'到'./node_modules/ngx-bootstrap/datepicker/themes/bs/bs-datepicker-view.html'.

效果很好

我必须更新 ngm-cli(用于 UMD 捆绑),但现在这个问题应该会在 ngx-bootstrap@2.0.0-beta.6

中消失