Currently, I have a map with markers that trigger an overlay-div to open when clicked.
<div class="map" ng-init="loadall()">
<a ng-click="details.show=!details.show" href="#/dealer/{{marker.id}}" class="marker" style="left:{{marker.coordleft}}px;top:{{marker.coordtop}}px" ng-repeat="marker in dealer"></a>
</div>
This is the div that opens:
<div ng-show="details.show">
<div ng-view></div>
</div>
Issue at Hand:
My customer has noticed that when one marker's div is already open (details.show == true) and another marker is clicked, the div closes before reopening.
Desired Outcome:
I would like for the new content to load into the ng-view without closing and reopening the div if it is already open.
Can this functionality be achieved?
EDIT:
Details of My Routes:
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/dealer/:id', {templateUrl: 'files/tpl/dealer-details.html?20', controller: 'DealerDetailsCtrl', activetab: 'details'}).
when('/dealermessage/:id', {templateUrl: 'files/tpl/dealer-message.html?124', controller: 'DealerMessageCtrl', activetab: 'message'}).
when('/dealersendmessage/:id', {templateUrl: 'files/tpl/dealer-details.html?8', controller: 'DealerDetailsCtrl', activetab: 'details'}).
otherwise({redirectTo: '/dealer'});
}]);
When a marker is clicked, the respective route and controller are loaded. Could this information help resolve the issue?
Second Edit:
The toggle between "marker/div" now works, but there is a strange behavior with the opened overlay.
For Example:
Opening "Marker 1" displays the div correctly. However, when the div for "Marker 1" is open and I click on "Marker 2," the div refreshes with the content of "Marker 2." But then, clicking back on "Marker 1" suddenly closes the div.
How can this unexpected behavior be prevented?