jquery - Angular JS - repeat image tag for numbers in array -


i'm modifying question bit since not able proper solution previously.

i have array products_page=["7","8","6","9","5","7","8","9","8","7"]

each time below table's ng-repeated based on json values, image tag (commented as: please note image tag needs repeated) needs repeated 7 times on first ng-repeat, 8 times on second ng-repeat, 6 times on third ng-repeat , on....

<table class="table table-bordered">     <tbody>         <tr ng-repeat="user in users[0].tvseries | filter: searchtext | filter: genre.config | orderby:predicate">             <td>                 <img ng-src="{{user.thumbnail}}" alt="" />             </td>             <td>                 <div>{{user.tv_show_name}}</div>                 <div>{{user.brief_description}}</div>                 <div>rating:                 <!--please note image tag needs repeated-->                 <img ng-repeat="rate in getnumber(products_page[$index]) track $index" src="img/star.png" width="15" height="15" />                 <!--please note image tag needs repeated-->                 {{user.rating}}</div>             </td>             <td>                 <div>show time:{{user.show_time}}</div>                 <div>genre:{{user.genre}}</div>                 <div>season:{{user.current_season}}</div>                 <div>episode:{{user.current_episode}}</div>             </td>         </tr>     </tbody> </table> 

is there way achieve this?

if have got question, may use $index of parent in child ng-repeat.

in html:

<ul> <li ng-repeat="i in getnumber(mynumber)">         <ul>             <li ng-repeat="j in getnumber($index+1)"> <span>{{$index+1}}</span>              </li>         </ul>     </li> </ul> 

http://jsfiddle.net/chqlh/90/


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -