I have an ion-view which contains a map or a list. A button allows the user to switch between the two modes. Here is my issue: if the view is initialized to show the map, all is well. But if the view is initialized to show the list, when the button is pressed to switch the map is all cropped up. I forked the tab codepen from ionics to show the behavior: http://codepen.io/anon/pen/OPrvRG. Right now I have it initialized to map mode. Change this line in the JS file:
$scope.viewMode = 'Map';
to
$scope.viewMode = 'List';
to see the issue.
Any idea why this is happening and how to fix it?
Ps: This is (I think) unrelated, but on codepen unless I put an alert when the mode is switched, the mode immediately reverts. On my device this doesn’t happen. So I wouldn’t worry about it unless you think it is related.