angular-vs-repeat icon indicating copy to clipboard operation
angular-vs-repeat copied to clipboard

Proposal: possibility to render all elements (turn off vs-repeat)

Open Aknilam opened this issue 9 years ago • 4 comments

In some cases it would be useful to be able to turn off vs-repeat functionality. I mean to conditionally show all elements as if vs-repeat didn't work.

An example use case: print html page to PDF.

Aknilam avatar Apr 13 '16 06:04 Aknilam

+1

vskosp avatar Jun 30 '16 10:06 vskosp

I've been trying to do this today. I need vs-repeat to only "turn on" when a certain condition in my controller is met.

My initial thoughts were that I could simply conditionally include the vs-repeat attribute like so:

<div ng-attr-vs-repeat="someCondition">

but that didn't work, I'm not sure why. It was behaving as if the directive wasn't loading.

I've attempted various ways of conditionally including vs-repeat, even manually injecting the module dependency via app.requires but nothing is working :(

If anyone has any thoughts or insight, they'd be gratefully received.

AndrewIsh avatar Aug 24 '16 13:08 AndrewIsh

you can ng-if two sets of lists. one with vs-repeat and one without. other option is to increase shown elements to array length.

majster avatar Jan 07 '17 11:01 majster

$scope.$broadcast('vsRenderAll') above the scope of vs-repeat directive and options.latch = true should help. Having specific setting for this would be better.

amalitsky avatar Apr 25 '18 22:04 amalitsky