0

我将 ngx-bootstrap v1.9.3 安装到我的 Angular 4 项目中。我尝试使用 a BsDatepickerModule但它对我不起作用。

此错误消息指出:

404 获取 /bs-datepicker-view.html

我的项目代码:

import { BsDatepickerModule } from 'ngx-bootstrap';

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

export class AppModule(){}
4

3 回答 3

1

1.Go to this path "\node_modules\ngx-bootstrap\bundles\ngx-bootstrap.umd.js" 2.Search for "bs-datepicker-view.html" in ngx-bootstrap.umd.js 3.Change the TemplateURL从 './bs-datepicker-view.html' 到'./node_modules/ngx-bootstrap/datepicker/themes/bs/bs-datepicker-view.html' 的位置路径。

它的效果很好。

于 2017-09-26T07:14:39.433 回答
0

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

于 2017-09-26T05:56:04.787 回答
0

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

于 2017-10-03T13:51:28.073 回答