title: AngularJS - ng-click and ng-show
body: <p>I have a map with some markers on it. On click, each marker is opening a overlay-div.  </p>
  
  <pre><code> &lt;div class="map" ng-init="loadall()"&gt;
              &lt;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"&gt;&lt;/a&gt;    
          &lt;/div&gt;  
  </code></pre>
  
  <p><strong>it's opening this div:</strong>  </p>
  
  <pre><code>&lt;div ng-show="details.show"&gt;      
      &lt;div ng-view&gt;&lt;/div&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p><strong>Problem:</strong><br>
  If the div is already open (details.show == true) my customer noticed, that if you leave it open and click on an other marker on the map, the div closes again.  </p>
  
  <p><strong>What I want to achieve:</strong><br>
  If the div is already open, just load the new content into the ng-view without closing and reopening the div again.  </p>
  
  <p>Is this possible?  </p>
  
  <p>EDIT:  </p>
  
  <p><strong>My routes:</strong> </p>
  
  <pre><code>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'});
  }]);  
  </code></pre>
  
  <p>If a marker has been clicked, the first route and controller are loading.Is this helping out?  </p>
  
  <p><strong>EDIT No.2:</strong><br>
  The "marker/div toggle is working now but I have now a strange behavior of the opened overlay.  </p>
  
  <p><strong>Example:</strong><br>
  When I open "Marker 1" the div is opening fine. When the div for "Marker 1" is open, I can click on "Marker 2" and the div refreshes with the content of "Marker 2". But when I now click on "Marker 1" the div suddenly closes.<br>
  How can I stop it? </p>