0

I have a slider with ng-repeat (looped). And I want it to show the first slider according to the user input (from the prev view).

For example, if the user chose "veges", then the first slide will show tomato, and if the user chose "fruits", then the slider will start from the slide with an apple. But slider should always contain all veges and fruits.

var items = [ // veges { family: 'vege', name: 'tomato' }, { family: 'vege', name: 'potato', }, // fruits { family: 'fruits', name: 'apple' }, { family: 'fruits', name: 'banana', }];

Any ideas how to do that?

  • make 2way binding for slider source and upon user selection, filter that slider resource to made selection. – Hardik Vaghani Oct 03 '16 at 10:03
  • @HardikVaghani , sorry mate, not quite got it.. Can you please give some more details about creating a filter that will show the whole array, but start on particular object? – Olga Smirnova Oct 04 '16 at 02:59

0 Answers0