title: Angular injection error when adding the controller in a form of navbar dropdown
body: <p>I'm very new to angularjs and SPA.</p>
  
  <p>I was trying to use the navbar structure of bootstrap adding a login section as a dropdown in a index spa. I want to click on the sign in button and call the function to authenticate and hide the dropdown of login when the authentication is ok.</p>
  
  <p>At the beginning I didn't include the controller in the HTML, but then I included the attribute ng-controller and I don't know why I'm getting this error</p>
  
  <pre><code>Error: [$injector:unpr] http://errors.angularjs.org/1.5.8/$injector/unpr?p0=%24scopeProvider%20%3C-%20%24scope%20%3C-%20MyService
  </code></pre>
  
  <p>So if I remove the ng-controller="MyController" I don't get the error but I cannot call the method from the controller and I tried this before but without any success.</p>
  
  <pre><code>angular.element(document.getElementById('frmMyController')).scope().authenticate();
  </code></pre>
  
  <p>But as I said if add the ngcontroller my app will generate the injection error. </p>
  
  <p>I pasted my code in <strong><a href="https://jsfiddle.net/uwb16cu9/1/" rel="nofollow">jsfiddle</a></strong> but it doesn't generate any error.</p>
  
  <p>So, how can I call the method authenticate with the button sign in correctly and then if the response is ok, how to hide the dropdown button signin and show the profile authenticated?</p>