Javascript 相当于ng重复的聚合物
我正在重写一个页面,该页面目前正在使用一个角度1框架来聚合1(或2)。我不知道在聚合物中ng重复的等价物是什么。这就是我现在在Angular 1中看到的Javascript 相当于ng重复的聚合物,javascript,angularjs,polymer,Javascript,Angularjs,Polymer,我正在重写一个页面,该页面目前正在使用一个角度1框架来聚合1(或2)。我不知道在聚合物中ng重复的等价物是什么。这就是我现在在Angular 1中看到的 <div class="consultant" ng-repeat="consultant in consultants | limitTo:i"> <p>{{consultant.displayName}}</p> <p ng-if="consulta
<div class="consultant" ng-repeat="consultant in consultants | limitTo:i">
<p>{{consultant.displayName}}</p>
<p ng-if="consultant.phoneNumber != undefined" >☎ {{consultant.phoneNumber}}</p>
<br ng-if="consultant.phoneNumber == undefined" />
<p class="email" ng-if="consultant.email != undefined" ><span class="icon-envelope"></span><a href="mailto:{{consultant.email}}"> {{consultant.email}}</a></p>
<br ng-if="consultant.email == undefined" />
</div>
{{consultant.displayName}
☎ {{consultant.phoneNumber}
您正在寻找的是而且可能是
在您的情况下,这可能看起来像这样:
<template is="dom-repeat" items="[[consultants]]" as="consultant">
<div class="consultant">
<p>[[consultant.displayname]]</p>
<template is="dom-if" if="[[consultant.phoneNumber]]">
<p>☎ [[consultant.phoneNumber]]</p>
</template>
<template is="dom-if" if="[[!consultant.phoneNumber]]"><br></template>
<template is="dom-if" if="[[consultant.email]]">
<p class="email">
<span class="icon-envelope"></span>
<a href="mailto:[[consultant.email]]">[[consultant.email]]</a>
</p>
</template>
<template is="dom-if" if="[[!consultant.email]]"><br></template>
</div>
</template>
[[consultant.displayname]]
☎ [[consultant.phoneNumber]]