首页 > 解决方案 > 如何使用 Angular js 在花括号中执行 html 代码

问题描述

我将 AngularJS 与数据库一起使用。我用 html 代码获取数据。但是html代码是显示而不是执行的。

这是html代码:

<a href="https://click.linksynergy.com/link?id=h7JbohyS4d4&offerid=571616.12819347524&type=2&murl=https%3A%2F%2Fwww.marimekko.com%2Fus_en%2Fsitriini-husina-dress-046222-910%3Ffee%3D1%26fep%3D48683">
  <IMG border=0 width=100% src="https://www.marimekko.com/media/catalog/product/0/4/046222-910_10_1528138086.jpg" >
</a>
<IMG border=0 width=1 height=1 src="https://ad.linksynergy.com/fs-bin/show?id=h7JbohyS4d4&bids=571616.12819347524&type=2&subid=0" >

此代码应显示带有链接的图像,而不是仅显示代码

<div ng-repeat="x in names">
  <div>{{ x.Detail }}</div>  
  <div>{{ x.Company }}</div>
  <div>{{ x.Price }}</div>
  <div>{{ x.Link }}</div>
</div>

我在这里从数据库中获取数据吗?

标签: htmlangularjs

解决方案


推荐阅读