next.js 在网页中显示数据API [关闭]

2jcobegt  于 2023-05-28  发布在  其他
关注(0)|答案(1)|浏览(156)

已关闭,此问题需要details or clarity。目前不接受答复。
**想改善这个问题吗?**通过editing this post添加详细信息并澄清问题。

6天前关闭
Improve this question
我需要在网页中显示来自API(数组)的数据(html?).
从控制台到网站打印的数据:

wfypjpf4

wfypjpf41#

所以我使用Angular ,所以这是在 typescript :

newadress : string ;
newemail : string ;
newname : string ;
newphone : string ;

yourfunction(rev){

    this.newadress=this.yourobjectlist[rev.selectedIndex-1].adresse
      this.newemail=this.yourobjectlist[rev.selectedIndex-1].email
      this.partnerinfo1=this.yourobjectlist[rev.selectedIndex-1].name
      this.partnerinfo2=this.yourobjectlist[rev.selectedIndex-1].phone

  }

你的对象列表就是你在控制台上显示的数据列表

相关问题