title: How to show a loading Indicator if I have a user location error in Ionic
body: <p>I don't know how to show a loading indicator if I have a user location error, and then when I obtain again the location not show the loading indicator.</p>
  <p>Here is my code:</p>
  <pre><code>  async loadingIndicator () {
      const loading = await this.loadingController.create({
        cssClass: 'my-custom-class',
        message: 'error, we are getting your location...'
      })
      await loading.present()
    }
  
    ionViewWillEnter () {
      this.watchId = this.gpsService.watchPosition((location) =&gt; {
        this.userLatitude = location.coords.latitude
        this.userLongitud = location.coords.longitude
        console.log('User location: ', location)
      },
      { enableHighAccuracy: true, timeout: 60_000, maximumAge: null }
      )
  
    }
  
    updateLocation (location, err) {
      if (err) {
        console.error('updatelocation err: ', err)
        this.loadingIndicator()
        return
      }
      console.log('updateLocation', location)
    }
  </code></pre>