title: Angularjs - how to correct inject service from another module that is not depending?
body: <p>I didn't understand how work modular depending. </p>
  
  <p>I have 3 modules, they are dependent on each other, as shown in the picture.
  <img src="https://i.stack.imgur.com/uRU4I.jpg" alt="enter image description here"></p>
  
  <p>"App" module includes "module1" and "module2".
  "module2" includes "core" module. <a href="http://plnkr.co/edit/5DkHF3FG30wUK0KAcQuo" rel="nofollow noreferrer">There are source on plunker.</a></p>
  
  <pre><code>angular.module("core", []).factory("HelloWorld", function() {
    return function () {
      alert('Hello World!')
    }
  });
  
  angular.module("module1", []).controller("main", function(HelloWorld){
    HelloWorld();
  });
  
  angular.module("module2", ["core"]);
  
  angular.module("app", ["module1", "module2"]);
  </code></pre>
  
  <p>If I inject service from module core to module "module1" it is work fine. But "core" module not depend in module "module1". Why it happening?</p>