title: How to access regular Javascript function from AngularJS controller
body: <p>I have an angular function in my controller and I want to call an external javascript function, this won't work and I'm not sure what I'm missing:</p>
  
  <pre><code>$scope.addSubscription = function(){
    var id = $scope.userId;
    var name = Exec.UserService.fetch(id);
    $scope.user.push({id:id, name:name});
  }
  </code></pre>
  
  <p>My external javascript code looks something like this:</p>
  
  <pre><code>var Exec = (function() {
    "use strict";
          return {
             EntityManager: (function(){
               // some code here
             }());
  
             UserService: (function(){
               return {
                 fetch: function(id){
                   // some code here
                   return 'something';
                 },
  
                 modify: function(id, status){
                  // some code here
                 }
               }; 
             }()) 
           } // end of outer return
        }()); // end of Exec
  </code></pre>