1. When using angular and encountering two levels of ng-repeat nesting, use
<ul class="circle-list" ng-model="imgarry">
<li ng-repeat="masnum in news">
<p class="msgs_p">
<p ng-if="!masnum.shows" class="shows" ng-bind-html="masnum.content | cut:true:80:''"></p>
<p ng-if="masnum.shows" class="shows_hover" ng-bind-html="masnum.content"></p>
</p>
<p class="msg_imgs2" ng-switch-when="2">
<ul>
<li ng-repeat="nums in masnum.pics" >
<a href={{nums}} class="swipebox" style="background:url({{nums}}) center center;background-size:cover" ></a>
</li>
</p
</li>
</ul>
Among them, nums is the image path returned by the server, for example: http://image.wquan.net/201603...
I now need to obtain the domain name of this link address eg: http://image .wquan.net and the "-" character in this domain name address, and then intercept the parameters after the "-". How to do it in ng-repeat? Do I need to define a method on the a tag? ?
You can write a filter yourself