angular-deckgrid icon indicating copy to clipboard operation
angular-deckgrid copied to clipboard

ng-repeat not working within deckgrid

Open inttripurari opened this issue 11 years ago • 19 comments

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.

inttripurari avatar Jul 03 '14 14:07 inttripurari

I am experiencing the same issue. Anyone have a work around?

gjt2889 avatar Sep 22 '14 17:09 gjt2889

I have found one work around: create custom directive, which loops all items

Gedzis avatar Oct 15 '14 13:10 Gedzis

@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?

akoenig avatar Oct 31 '14 20:10 akoenig

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.

RyanWarner avatar Oct 31 '14 20:10 RyanWarner

+1 for this request.

colepacak avatar Dec 05 '14 14:12 colepacak

+1 It is definitly a bug.

aomader avatar Dec 11 '14 13:12 aomader

+1 Thanks!

chrisgco avatar Jan 08 '15 23:01 chrisgco

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.

mboudreau avatar Jan 13 '15 03:01 mboudreau

It's because author used different principle. If you connect model by source, then ng-repeat to repeat cards is redundant.

sielay avatar Jan 13 '15 10:01 sielay

@mboudreau Is there any demo site of your work? Thanks!

nypgand1 avatar Jan 28 '15 03:01 nypgand1

@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 .

mboudreau avatar Jan 28 '15 03:01 mboudreau

+1 Yup. ng-repeat would be nice.

Tsarpf avatar Feb 15 '15 14:02 Tsarpf

https://github.com/Tsarpf/Tsatter/commit/7e9315954dda5689862a0753e6fcd5085ad55418

here's what I did to go around it

Tsarpf avatar Feb 15 '15 15:02 Tsarpf

+1, it would be very nice to have it fixed.

agibalov avatar Apr 18 '15 07:04 agibalov

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 avatar Apr 21 '15 18:04 henry74

@henry74 we're talking about ng-repeat not working within deckgrid cards.

Tsarpf avatar Apr 21 '15 19:04 Tsarpf

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.

Tsarpf avatar Apr 21 '15 19:04 Tsarpf

Any progress on this issue or is it still a problem?

austincondiff avatar Dec 29 '15 05:12 austincondiff

Still a problem. However this link from @Tsarpf helped a lot! https://github.com/Tsarpf/Tsatter/commit/7e9315954dda5689862a0753e6fcd5085ad55418

duydnguyen07 avatar May 04 '16 03:05 duydnguyen07