title: Showing or hiding elements based on variables in controller - Ionic
body: <p>For all I know this might be more an AngularJS issue than an Ionic specific one. I have a button in one of my views:</p>
  
  <pre><code>&lt;button class="button button-clear button-block button-positive" ui-sref="register"&gt;
      Register
   &lt;/button&gt;
  </code></pre>
  
  <p>And in my controller I have this variable that I get from local storage that is either true or false and has to be hidden depending that the value is:</p>
  
  <pre><code>app.controller('loginController', ['$scope', '$localstorage',
    function($scope, $localstorage) {
  
    // Check if the user has already requested a register, and if true, hide
    // the 'Register' button
    if ($localstorage.get("registrationRequested", false) === true) {
      // How do I do this?
    }
  
  }]);
  </code></pre>
  
  <p>Now the first question probably is, is it even a best practice to manipulate the dom like that from my controller? And if not, where and how do I do it? If its' fine doing it in my controller, then how do I reference that button and hide it?</p>