title: http.get request jumps the function(result)
body: <p>I'm trying to find why does my function jumps after the request is done..
  I mean it doesn't enter on <code>.then(function(result){ }</code>.</p>
  
  <p>I think it might be because of the <code>&lt;a&gt;</code> element that has an <code>onclick</code> attribute with an <code>href</code> attribute.</p>
  
  <p>Have you ever seen this problem?</p>
  
  <pre><code>var app = angular.module('devicesFromGroup', ['ngResource']);
  
  var myInjector = angular.injector(["ng"]);
  var $http = myInjector.get("$http");
  //var $scope= myInjector.get("$scope");
  
  function funcb($http){
      console.log("OLIEIEIEIEI");
      $http.get('http://localhost:8080/api/stuff/2')
      .then(function(result) {
          console.log("it's not printed");
      });
  }
  
  function funcC(id){
      myInjector.invoke(funcb);
      return true;
  };
  </code></pre>
  
  <p>And then, in other JavaScript I have:</p>
  
  <pre><code>var a = document.createElement("a");
  a.setAttribute('href',"http://localhost:8080/DevicesFromGroup.html");
  a.setAttribute('onclick',"funcC(id);");
  </code></pre>