angular-deckgrid
angular-deckgrid copied to clipboard
ng-repeat not working within deckgrid
I am Using angular-deckgrid to create pinterest like view Here is the Code I have written
<div deckgrid source="items" class="deckgrid">
<span data-ng-repeat='i in card'>{{ i }}</span>
</div>
I am expecting the value of i in the ng-repeat, but that seems to be not going in the loop. Can any one please suggest me the solution.
I am experiencing the same issue. Anyone have a work around?
I have found one work around: create custom directive, which loops all items
@Gedzis In this case it is a proper solution as @inttripurari tries to loop through all the properties (as far as I understand). @inttripurari Is this something you can work with?
Creating a custom directive just to pass in data to loop through seems like a hack. ng-repeat of any kind within a card currently does not work. I find that to be unexpected and a bug.
+1 for this request.
+1 It is definitly a bug.
+1 Thanks!
Try out my project instead. It's a simplistic version of Deckgrid, but works closer to native angular directives: https://github.com/mboudreau/angular-mosaic
ng-repeat within mosaic should work without a hitch.
It's because author used different principle. If you connect model by source, then ng-repeat to repeat cards is redundant.
@mboudreau Is there any demo site of your work? Thanks!
@nypgand1 Not yet, but that's a good idea :)
On Wed Jan 28 2015 at 14:44:21 nypgand1 [email protected] wrote:
@mboudreau https://github.com/mboudreau Is there any demo site of your work? Thanks!
— Reply to this email directly or view it on GitHub https://github.com/akoenig/angular-deckgrid/issues/53#issuecomment-71776441 .
+1 Yup. ng-repeat would be nice.
https://github.com/Tsarpf/Tsatter/commit/7e9315954dda5689862a0753e6fcd5085ad55418
here's what I did to go around it
+1, it would be very nice to have it fixed.
If you are using the source attribute, it will automatically loop over the source variable (e.g items) assuming "items" is an array. ng-repeat is not necessary unless I'm missing something...
@henry74 we're talking about ng-repeat not working within deckgrid cards.
For example if you have an array of users, and every user has a shopping list. We want a card for every user, and to use ng-repeat for the shopping list within that card.
Any progress on this issue or is it still a problem?
Still a problem. However this link from @Tsarpf helped a lot! https://github.com/Tsarpf/Tsatter/commit/7e9315954dda5689862a0753e6fcd5085ad55418