javascript - 在 ionic v3 中应用过滤器之前验证我是否收到日期
问题描述
我正在使用离子 v3。
具体来说:Ionic@3.20.1
我有以下代码片段
<button
ion-item
*ngFor="let case of cases"
(click)="show($event, case)">
<h3>
{{case.date | date: 'H:mm'}}
</h3>
</button>
我想验证的值是日期case.date
类型以避免 InvalidPipeArgument。
有什么想法可以使用ngIf
? 我想避免使用方法。
谢谢
解决方案
推荐阅读
- microsoft-graph-api - 是否可以将 Microsoft Graph API 的某些路由从客户 Azure 门户列入黑名单?
- oracle - 外键索引可以是另一个索引的一部分还是应该是独立的?
- python - %(parameter)s 在这里是什么意思
- postgresql - 从 Postgres 9 迁移到 13 后无法创建 postgis 扩展
- c++ - 为什么从主线程调用时,`std::promise::set_value` 会抛出错误?
- python - pip 在 conda env 中的 pycharm 安装包中,而不是在项目内的活动 venv 中
- jenkins - 您能否将 Jenkins 中“发布”块的范围限制为阶段结果状态
- google-chrome-extension - Chrome 扩展弹出窗口不显示工具提示,如箭头
- pytorch - 有 2 批向量,一个矩阵是 128 X 120,另一个是 100 X 120 我如何计算欧几里得距离?
- elasticsearch - Elasticsearch - 通过文档键搜索