Dynamically add slide as previous slide

I would like to add one slide in a slidebox.
The Example in http://codepen.io/calendee/pen/eCgrs/ works fine. But it adds the slide on the right side.
I would like to add the slide as previous slide on the left side.

Is there a way to add the slide to the left?

Best regards


If you always want it on the left, then you can put it in index 0 each time a new slide is added:

  $scope.data.slides.splice(0, 0,  {
    title : "Slide " + slideCounter,
    data : "Slide " + slideCounter + ' Content'

See codepen (forked from the above): http://codepen.io/brandyshea/pen/PwMagw

that works fine. Thank you.
But I have a second Problem:
I would like to set the second slide from left as my active slide. But setting the active slide doesn’t work.

My goal is always when I go from 2nd slide from left to 1st from left to add a slide at the left side.
At the moment the slide box jumps to the left slide. However, it should be active the 2nd slide from left.
This was originally the leftmost slide.

EDIT: Ifound a solution for the problem to set the active slide.
But there always skipped a slide.
http://codepen.io/MrQ/pen/qEegpY demonstrate the problem.

Best regards Jens

now it works.
https://codepen.io/anon/pen/emvEt helped me.