title: Controller and services are not loading in angularjs
body: <p>I have integrated requirejs with my angular app. 
  But while loading app, it gives me an error <code>'Argument 'appCtrl' is not a function, got undefined'</code></p>
  
  <p>Here is my controller code : </p>
  
  <pre class="lang-js prettyprint-override"><code>define(['Angular'], function (angular) {
     function appCtrl($scope, pathServices) {
       alert('sa');
     }
  
     function homeCtrl($scope, brandService) {
           console.log('dfd');
     }
  });
  </code></pre>
  
  <p>And along with this, it gives error for <code>'unknown provider pathServices'</code></p>
  
  <p>Service code is : </p>
  
  <p></p>
  
  <h2>serviceConfig.js</h2>
  
  <pre><code>define([
      'Angular',
      'common/Services/services',
      'current/js/services'
  ], function(angular, commonServices, loacalStorageServices, currentServices) {
      "use strict";
  
      var services = {
          commonServices : commonServices,
          currentServices : currentServices,
      };
  
      var initialize = function (angModule) {
          angular.forEach(services,function(service, name) {
              angModule.service(name, service);
          });
      }
  
      return {
          initialize: initialize
      };
  });
  </code></pre>
  
  <h2>common/services.js</h2>
  
  <pre><code>define(['Angular'], function (angular) {
     var app = angular.module('myApp.services', []);
     app.factory('pathServices', function($http, $q, $rootScope) {
      function pathServices() {
              alert('as');
      }
      return new pathServices();
     });
  
     app.factory('anotherServices', function($http, $q, $rootScope) {
      function anotherServices() {
              alert('as');
      }
      return new anotherServices();
     });
  });
  </code></pre>
  
  <h2>current/services.js</h2>
  
  <pre><code>define(['Angular'], function(angular) {
  
      var app = angular.module('myApp.services', []);
  
      app.factory('brandsService', function() {
          function brandsService() {
              var autoCompleteData = [];
              this.getSource =  function() {
                  return autoCompleteData;
              }
  
              this.setSource = function(states) {
                  autoCompleteData = states;
              }
          }
          return new brandsService();
      });
  });
  </code></pre>
  
  <p>in serviceConfig.js I have included 2 service files.. But the problem is, the last current/service.js file overwrites all files.. How can I include multiple service files ?</p>
  
  <p>I am new to requirejs. How can I use controller function and services using requirejs ?
  Can anyone help ? </p>