title: How to convert jQuery code into usable AngularJS code
body: <p>I am new to AngularJS and would like to create functionality for a login page similar to what you find here when you click the 'Forgot Password' link:</p>
  
  <p><a href="http://bootsnipp.com/snippets/featured/login-amp-password-reminder#comments" rel="noreferrer">http://bootsnipp.com/snippets/featured/login-amp-password-reminder#comments</a></p>
  
  <p>Is it best to use a directive, since this is behavioral, instead of a controller? I've tried quite a bit with creating a controller for it, but as I search for help on the subject I find that using a controller for this may not be the way to go. Here was my latest trials which was unsuccessful (the link does nothing when clicked):</p>
  
  <p>on controller side in a js file:</p>
  
  <pre><code>angular.module('mean.users')
      .controller('SwitcherCtrl', ['$document',
          function($document) {
          $document.ready(function () {
              $document.getElementById('olvidado').click(function (e) {
                  e.preventDefault();
                  $document.getElementById('form-olvidado').toggle('500');
              });
              $document.getElementById('acceso').click(function (e) {
                  e.preventDefault();
                  $document.getElementById('form-olvidado').toggle('500');
              });
          });
      }
  ])
  </code></pre>
  
  <p>on html side, I included ng-controller="SwitcherCtrl" where necessary.</p>