Ionic Slidebox + Modal

Hi guys,

I’m a noob when it comes to ionic + angularjs. I’ve got an issue with using a slidebox and modal together in a view.

Please check my codepen at

On the homepage you will see a slide box with content “Test 1” and “Test 2”. I added a button “Open View1”. When clicking on that it does a $state.go to my view1 template. When clicking on the Back button in the navigation bar you will notice that the slide box content still displays fine on the homepage.

Going back to View1 and clicking the button “Open Modal” and then clicking “Close” in the right hand corner, I then navigate back to the homepage using the Back button on the nav bar. Now you will notice the content in my slide box is all squashed to the left. I’ve noticed that as soon as the Modal is opened the width of the slider is set to 0 immediately.

What am I doing wrong? Is is something to do with the scope? Any assistance would be greatly appreciated.

Okay, managed to sort it after seeing another post: Slidebox and modal issue