Angularjs 双引号内的角度指令(ng重复)
我正在使用metro ui,并试图在其中使用ng repeat在弹出窗口中构建html 我的模板看起来像这样。任何想法都会有帮助。我已经验证了数据是否存在,但ng repeat在双引号内不起作用。我试过使用单引号,但不起作用 这是我的模板Angularjs 双引号内的角度指令(ng重复),angularjs,angularjs-ng-repeat,metro-ui-css,Angularjs,Angularjs Ng Repeat,Metro Ui Css,我正在使用metro ui,并试图在其中使用ng repeat在弹出窗口中构建html 我的模板看起来像这样。任何想法都会有帮助。我已经验证了数据是否存在,但ng repeat在双引号内不起作用。我试过使用单引号,但不起作用 这是我的模板 <div class="container"> <div class="title-group six"> <a ng-repeat="product in products" data-hint="{{product.nam
<div class="container">
<div class="title-group six">
<a ng-repeat="product in products"
data-hint="{{product.name}}|<div><ul><li ng-repeat='color in product.colors'>{{color.name}}</li> </ul></div>" href="#/product/{{product.id}}" class="tile bg-violet" data-click="transform" >
<div class="tile-content icon">
<img src="{{product.pic}}">
</div>
<div class="brand">
<div class="label">{{product.name}} </div>
</div>
</a>
</div>
首先,您的HTML格式不正确,您需要在末尾添加一个结束DIV标记 另外,在ng repeat中,变量名应该与数组不同。我的建议是: ng重复=产品中的p或ng重复=产品中的产品 希望这能有所帮助