Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 双引号内的角度指令(ng重复)_Angularjs_Angularjs Ng Repeat_Metro Ui Css - Fatal编程技术网

Angularjs 双引号内的角度指令(ng重复)

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

我正在使用metro ui,并试图在其中使用ng repeat在弹出窗口中构建html

我的模板看起来像这样。任何想法都会有帮助。我已经验证了数据是否存在,但ng repeat在双引号内不起作用。我试过使用单引号,但不起作用

这是我的模板

<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重复=产品中的产品

希望这能有所帮助