Ion-slider via ng-repeat with starting point as a param

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

Alright… I’ve done it by this slicing the array based on the offset (passed param), and then merged two arrays. Is there more efficient way to do this? Please!

        if(user_choice == 'vege') {
            offset = 0;
        }
        else if(user_choice == 'fruits') {
            offset = 2;
        }
        else{
            offset = 0; // vege is a default value
        }

        a_start = items.slice(offset);
        a_end  = items.slice(0,offset);

        items   = a_start.concat(a_end);

        return items;