title: Ionic 3 alert popup
body: <p>I am having a strange problem, when an alert appears and i dismiss it with the "ok" button and calling it again makes the alert appear twice now.
  Cant figure it out what is going on, how i know at dismiss the alert is destroyed but its not.</p>
  
  <p>The code is like in the ionicframework documentation:</p>
  
  <pre><code>presentAlert() {
    const alert = this.alertCtrl.create({
      title: 'Low battery',
      subTitle: '10% of battery remaining',
      buttons: ['Dismiss']
    });
    alert.present();
  }
  </code></pre>
  
  <p>Lets say the function in bound to a click function on a button. Clicking on it makes it appear. Then closing it with the dismiss button and then clicking the open button again will make it appear two times.
  Thanks in advance,
  Trix</p>
  
  <p>Added full code:</p>
  
  <pre><code>import { Component, ElementRef, ViewChild } from '@angular/core';
  import { IonicPage, NavController, NavParams } from 'ionic-angular';
  import leaflet from 'leaflet';
  import { AlertController } from 'ionic-angular';
  
  @IonicPage()
  @Component({
    selector: 'page-map',
    templateUrl: 'map.html',
  })
  export class MapPage {
  
    view: string = "map";
    lat: number;
    lng: number;
    @ViewChild('map') mapContainer: ElementRef;
    map: any;
    locations: any;
    private markerGroupSelf: any;
    public alert: any;
  
    constructor(public navCtrl: NavController, public navParams: NavParams, public alertCtrl: AlertController) {
      this.locations = [
        ["Popup1",true,46.0331797,17.9968659],
        ["Popup2",true,46.0331797,17.8968659],
        ["Popup3",true,46.0331797,17.7968659],
        ["Popup4",true,46.0331797,17.6968659],
        ["Popup5",true,46.0331797,17.5968659],
        ["Popup6",true,46.0331797,17.4968659],
        ["Popup7",true,46.0331797,17.3968659],
        ["Popup8",false,46.0331797,17.2968659],
        ["Popup9",true,46.0331797,17.1968659]
      ];
    }
  
    ionViewDidLoad() {
      this.getMap();
    }
  
    presentAlert() {
      this.alert = this.alertCtrl.create({
        title: 'GPS error',
        subTitle: 'Please turn on your gps!',
        buttons: ['Dismiss']
        });
        this.alert.present();
    }
  
    getMap() {
      this.map = leaflet.map("map");
      leaflet.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
        attributions: 'Map data &amp;copy; &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; contributors, &lt;a href="http://creativecommons.org/licenses/by-sa/2.0/"&gt;CC-BY-SA&lt;/a&gt;, Imagery © &lt;a href="http://mapbox.com"&gt;Mapbox&lt;/a&gt;',
        minZoom: 6
      }).addTo(this.map); 
  
      this.map.bounds = [],
  
      this.map.fitBounds([
        [45.636684, 16.030223],
        [48.708459, 22.863228]
      ]);
  
      this.map.setMaxBounds([
        [45.636684, 16.030223],
        [48.708459, 22.863228]
      ]);
  
      let markerGroup = leaflet.featureGroup();
      for (var i = 0; i &lt; this.locations.length; i++) {
        if(this.locations[i][1] == true){
          let location: any = leaflet.marker([this.locations[i][2],this.locations[i][3]]).bindPopup('&lt;strong&gt;'+ this.locations[i][0] +'&lt;/strong&gt;')
          .openPopup();
          markerGroup.addLayer(location);
        }
  
        let radius: any = leaflet.circle([this.locations[i][2],this.locations[i][3]], 5000).addTo(this.map);
        markerGroup.addLayer(radius);
      }
      this.map.addLayer(markerGroup);
    }
  
    locate(lat,lng){
      this.map.locate({
        setView: true,
        maxZoom: 10,
        timeout: 10000,
        enableHighAccuracy: true
      }).on('locationfound', (e) =&gt; {
        var LeafIcon = leaflet.Icon.extend({
          options: {
              shadowUrl: 'https://example.com/assets/themes/frontend/auth/images/markers/marker-shadow.png',
              iconSize: [25, 38], // size of the icon
              iconAnchor: [12, 38], // point of the icon which will correspond to marker's location
              popupAnchor: [115, 110] // point from which the popup should open relative to the iconAnchor  
          }
      });
  
      let redIcon = new LeafIcon({iconUrl: 'https://example.com/assets/themes/frontend/auth/images/markers/marker-icon-red.png'})
  
      if(lat != null &amp;&amp; lng != null){
        this.lat = lat;
        this.lng = lng;
      } else {
        this.lat = e.latitude;
        this.lng = e.longitude;
      }
  
      this.markerGroupSelf = leaflet.featureGroup();
      let markerSelf = leaflet.marker([this.lat, this.lng], {icon: redIcon});
      let radiusSelf = leaflet.circle([this.lat, this.lng], 5000,{color: 'red', opacity:.5});
  
      this.markerGroupSelf.addLayer(radiusSelf);
      this.markerGroupSelf.addLayer(markerSelf);
      this.map.addLayer(this.markerGroupSelf);
  
      }).on('locationerror', (err) =&gt; {
        this.presentAlert();
      })
    }
  }
  </code></pre>