加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

typescript – Angular2 ng对于未在Safari上呈现的内容

发布时间:2020-12-17 07:22:46 所属栏目:安全 来源:网络整理
导读:我有一个ngFor循环中的元素列表.刷新页面时,仅加载第一个元素数据.当我单击一个空元素时,数据会突然弹出.只有在Safari中查看时才会发生这种情况如何让Safari加载所有内容? article *ngFor="let item of list; let i = index" section class="item__content"
我有一个ngFor循环中的元素列表.刷新页面时,仅加载第一个元素数据.当我单击一个空元素时,数据会突然弹出.只有在Safari中查看时才会发生这种情况如何让Safari加载所有内容?

<article *ngFor="let item of list; let i = index">
    <section class="item__content">
      <h3 class="item__name">
        <a href="#">{{item.name}}</a>
      </h3>
      <p>
        {{item.description}}
      </p>
    </section>
</article>

数据来自一个提供JSON的API.

经过大量的反复试验,我的问题是缺少特定格式的日期管道.
<time>{{topic.lastPostAt|date}}</time>

把它改成这个解决了它:

<time>{{topic.lastPostAt|date:"MM/dd/yy"}}</time>

我在StackOverflow上的示例代码虽然缺少这个.出于某种原因,Safari只能在触发用户事件时呈现内容.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读