我想createdDate
使用来自 的日期管道进行格式化api
,并在我的模板中呈现html
如何做到这一点?
api
响应如下所示:
杰森:
{
"id":18,
"firstName":"Zeeshi",
"lastName":"Mughal",
"userName":"zeeshi",
"email":"zeeshan.ahmad@codeteck.com",
"emailVerified":0,
"phone":"+92307886689",
"phoneVerified":0,
"role":"Employee",
"createdDate":"2021-11-30T06:12:51.000Z"
}
html:
<div class="first-name"
*ngFor="let profileinfo of profileinfo | keyvalue">
<h2>
<span class="info-color">{{profileinfo.key}}</span>
</h2>
<p>
{{ profileinfo.value}}
</p>
</div>