angular - 仅从 ng-bootstrap 安装 datepicker
问题描述
我想使用 ng-bootstrap 包中的 datepicker: https ://ng-bootstrap.github.io/#/components/datepicker/overview
有没有办法只安装 datepicker 及其依赖项而不是所有包?
解决方案
您不能只安装 datepicker,但您只能在项目中导入 datepicker。
ng-boostrap
导出所有子模块,如果您只想使用 datepicker,您可以只导入 datepicker:
...
import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
...
@NgModule({
imports: [..., NgbDatepickerModule.forRoot()],
...
当你构建你的项目时,只有来自 ng-bootstrap 的这个模块会被添加到你的包中。
推荐阅读
- c# - 如何在 ZOHO CRM 中制作公式字段?
- sql - SQL Select FOR XML PATH - 将排序和连接字符串与递增计数器组合
- android - 在 Square.Retrofit 上,如何设置 CallAdapter.Factory 以便 Retrofit 使用我的 CallAdapter
>> - python - 从一个不规则纬度网格重新网格化到另一个不规则纬度网格
- python - python文件反编译加密文件
- android - 当ChannelResult为channelResult = Value(失败)时如何重试kotlin通道trySend
- powerbi - PowerBI - 根据最近的日期选择度量的最后一个非空白值
- reactjs - 将数据输入输入时移除 React Trix 颜色
- c# - PowerShell Invoke() 函数在几次尝试后没有响应
- javascript - 产品筛选器在筛选多个类别时显示重复产品