fireholster
fireholster

Reputation: 640

Angular bootstrap modal is resetting the child views

I am new to angular and have a situation where we have nested views and one of the view has link(s) to open a modal

But the issue is that when the modal opens up one of the views in the background is getting reset..dont know why and how can we resolve it?

[Plnkr][1] : http://embed.plnkr.co/dliyNd5EaobgkFNA8Xxg/

will really appriciate the help..

so the issue if if we open child1 on the page and then click on open modal it actually clears the child 1 view

Upvotes: 1

Views: 63

Answers (1)

Pengyy
Pengyy

Reputation: 38189

You have defined a home.modal1 state, and trying to redirect to it by ui-sref in view2.html. As it didn't have a template to show, so you will see a blank page which looks like the child views are resetted.

I have add a template for home.modal1 state with your plunker to help you confirm that.


You can change the ui-sref to ng-click and define a function in view2.html controller which calls the $modal.open to open the modal.

Upvotes: 1

Related Questions