title: How to present a popup viewController using ionic (v1) framework?
body: <p>I am implementing an application using <strong><a href="https://ionicframework.com/" rel="nofollow noreferrer">ionic v1</a></strong>, im creating a utility <code>.js</code> file to separate some functions that will be used only on development environment. I`m trying to implement a function that can be accessed from any <strong>ionic view</strong>. The code that im using is:</p>
  
  <pre><code>myApp.prototype.showAlert = function() {
     var alertPopup = $ionicPopup.alert({
       title: 'Gendalf',
       template: 'You shall not Pass'
     });
   };
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OBrXS.jpg" rel="nofollow noreferrer"><strong>Example</strong></a></p>