title: getelementbyid in Ionic popup
body: <p>I'd like to call popup and some js function with one button. I need to change texts in popup with this function. My popup code is:</p>
  
  <pre><code>angular.module('starter')
    .controller('PopupCtrl', function($scope, $ionicPopup, $timeout) {
      $scope.showAlert = function() {
        var alertPopup = $ionicPopup.alert({
          title: '&lt;div id="location-status"&gt;&lt;/div&gt;',
          template: '&lt;div class="text-center"&gt;&lt;ion-spinner icon="ripple" class="spinner-positive"&gt;&lt;/ion-spinner&gt;&lt;/div&gt;'
        });
      };
    });
  </code></pre>
  
  <p>Function is simple so far:</p>
  
  <pre><code>function writeText() {
    document.getElementById("location-status").innerHTML = "Some text"
  }
  </code></pre>
  
  <p>And button:</p>
  
  <pre><code>&lt;button class="button button-icon icon ion-android-locate" ng-click="showAlert()" onclick="writeText()"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>It works when my div id="location-status" is somewhere in index.html file. It didn't work in popup. What's wrong?</p>