【发布时间】:2018-09-27 10:48:46
【问题描述】:
我需要一个解决方案,我有一个 Android 应用程序的管理员发布应用程序。我已经为发布放置了一个删除按钮。要求是删除按钮必须在发布后显示 5 分钟。
这是我使用的 ngif 条件..
*ngIf="((((post.CreatedDate | date:'dd/MM/yyyy') == (PresentDate | date:'dd/MM/yyyy')) && ((post.CreatedDate | date:'HH') == (post.CreatedDate | date:'HH')))&&((post.CreatedDate | date:'mm')< (time)))"
TS 页面中当前时间 + 5 分钟的代码
const d: Date = new Date();
this.PresentDate = d;
var x = new Date();
d.getHours(); // => 9
d.getMinutes(); // => 30
this.time = d.getMinutes() +5;
this.hours = d.getHours();
请帮忙解决
【问题讨论】:
标签: time angular-ng-if