title: How to remove module not found error in angular?
body: <p>I make a simple example of controller here .</p>
  
  <p><a href="http://plnkr.co/edit/dplJ6sf4kgiwJ5pXu4GE?p=preview" rel="nofollow">http://plnkr.co/edit/dplJ6sf4kgiwJ5pXu4GE?p=preview</a></p>
  
  <p>and I want to test the controller .I am able to test my controller online</p>
  
  <p>Here is my code to test my controller online
  <a href="http://plnkr.co/edit/xzvhXHPoUdulOM9clOkQ?p=preview" rel="nofollow">http://plnkr.co/edit/xzvhXHPoUdulOM9clOkQ?p=preview</a></p>
  
  <p>But when I try to run that same work on my computer my test case are fail 
  I am getting error this</p>
  
  <pre><code>Module 'app.home' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
  </code></pre>
  
  <p>Here is my computer code.
  <a href="https://dl.dropbox.com/s/no901z41bza7osm/SimpleDemo.zip?dl=0" rel="nofollow">https://dl.dropbox.com/s/no901z41bza7osm/SimpleDemo.zip?dl=0</a></p>
  
  <p>Please run <strong>npm install</strong>  to add dependency .</p>
  
  <p>Here is my karma.conf.js file</p>
  
  <pre><code>// Karma configuration
  // Generated on Fri Dec 18 2015 19:53:32 GMT+0530 (IST)
  
  module.exports = function(config) {
    config.set({
  
      // base path that will be used to resolve all patterns (eg. files, exclude)
      basePath: '',
  
  
      // frameworks to use
      // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
      frameworks: ['jasmine'],
  
  
      // list of files / patterns to load in the browser
      files: [
  
          'bower_components/angular/angular.js' ,
          'bower_components/jquery/dist/jquery.js' ,
          'bower_components/angular-ui-router/release/angular-ui-router.js' ,
          'bower_components/angular-mocks/angular-mocks.js' ,
          'bower_components/angular-resource/angular-resource.js' ,
  
  
          'app/*.js',
          'app/**/*.js',
          'app/**/*.html',
        'test/**.js'
      ],
  
  
      // list of files to exclude
      exclude: [
      ],
  
  
      // preprocess matching files before serving them to the browser
      // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
      preprocessors: {
          'app/**/*.html':['ng-html2js']
      },
  
        ngHtml2JsPreprocessor:{
            moduleName:'templates'
  
      },
  
      // test results reporter to use
      // possible values: 'dots', 'progress'
      // available reporters: https://npmjs.org/browse/keyword/karma-reporter
      reporters: ['progress'],
  
  
      // web server port
      port: 9876,
  
  
      // enable / disable colors in the output (reporters and logs)
      colors: true,
  
  
      // level of logging
      // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
      logLevel: config.LOG_INFO,
  
  
      // enable / disable watching file and executing tests whenever any file changes
      autoWatch: true,
  
  
      // start these browsers
      // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
      browsers: ['Chrome'],
  
  
      // Continuous Integration mode
      // if true, Karma captures browsers, runs the tests and exits
      singleRun: false,
  
      // Concurrency level
      // how many browser should be started simultanous
      concurrency: Infinity
    })
  }
  </code></pre>
  
  <p>here is my code <strong>testing</strong></p>
  
  <pre><code>(function(){
  
      'use strict'
      describe('http controller test', function() {
  
          var $rootScope,
              $scope,
              controller,
              $q,
              $httpBackend;
  
          beforeEach(function() {
              module('app');
  
              inject(function($injector) {
                  $rootScope = $injector.get('$rootScope');
                  $scope = $rootScope.$new();
                  controller = $injector.get('$controller')('homeCntrl', {
                      $scope: $scope
                  })
  
  
              })
          })
  
  
  
  
          describe('Init value', function() {
              it('check name value', function() {
                  expect(controller.message).toBeUndefined();
              })
  
          })
  
          it('it should be true', function() {
              expect(true).toBeTruthy();
  
          })
      })
  
  
  })()
  </code></pre>
  
  <p>any update ?how to do testing of controller?</p>
  
  <p><strong>update 1</strong></p>
  
  <p>when I write like that it is not working ...check these file</p>
  
  <pre><code>'app/**/*.js',
              'app/*.js',
              'app/home/controller/*.js',
              'app/**/*.html',
             'test/**.js'
  </code></pre>
  
  <p><strong>whole code</strong></p>
  
  <pre><code> files: [
  
          'bower_components/angular/angular.js' ,
          'bower_components/jquery/dist/jquery.js' ,
          'bower_components/angular-ui-router/release/angular-ui-router.js' ,
          'bower_components/angular-mocks/angular-mocks.js' ,
          'bower_components/angular-resource/angular-resource.js' ,
  
  
  
  
          'app/**/*.js',
          'app/*.js',
          'app/home/controller/*.js',
          'app/**/*.html',
         'test/**.js'
      ],
  </code></pre>
  
  <p>but when I write like that it work perfectly why ?</p>
  
  <pre><code> files: [
  
          'bower_components/angular/angular.js' ,
          'bower_components/jquery/dist/jquery.js' ,
          'bower_components/angular-ui-router/release/angular-ui-router.js' ,
          'bower_components/angular-mocks/angular-mocks.js' ,
          'bower_components/angular-resource/angular-resource.js' ,
  
  
  
  
          'app/home/*.js',
          'app/app.js',
          'app/home/controller/*.js',
          'app/**/*.html',
         'test/**.js'
      ],
  </code></pre>