title: Angularjs - Argument 'homeController' is not a function, got undefined
body: <p>I have an ionic application that gives me below mentioned error when navigating `homeController's scope.</p>
  
  <p>Here's my app.js file:</p>
  
  <pre><code>var app = angular.module('app', [
    //external modules
    'ionic',
    //feature modules
    'home',
    'events',
    'news'
  ])
  app.config(function($stateProvider, $urlRouterProvider) {
    $stateProvider
    // setup an abstract state for the tabs directive
      .state('main', {
        url: '/',
        abstract: true,
        templateUrl: 'templates/main-nav.html'
      })
  
    // Each tab has its own nav history stack:
  
      .state('main.home', {
        url: '/home',
        views: {
          'main-home': {
            templateUrl: 'templates/main-home.html',
            controller: 'homeController'
          }
        }
      });
  $urlRouterProvider.otherwise('/home');
  )}
  </code></pre>
  
  <p>Here's my controller:</p>
  
  <pre><code>app.controller('homeController', ['$scope', '$stateParams',
    function ($scope, $stateParams) {
      $scope.homeTitle = 'News';
    }
  ]);
  </code></pre>
  
  <p>Here's my index.html:</p>
  
  <pre><code>&lt;body ng-app="app"&gt;
  
      &lt;ion-nav-bar class="bar-stable"&gt;
        &lt;ion-nav-back-button&gt;
        &lt;/ion-nav-back-button&gt;
      &lt;/ion-nav-bar&gt;
  
      &lt;ion-nav-view&gt;&lt;/ion-nav-view&gt;
    &lt;/body&gt;
  </code></pre>
  
  <p>Here's my template:</p>
  
  <pre><code>&lt;ion-view view-title="News"&gt;
    &lt;ion-content class="padding"&gt;
      Hello world!
    &lt;/ion-content&gt;
  &lt;/ion-view&gt;
  </code></pre>
  
  <p>I have gone through similar questions available in here, but couldn't find one that appeals with this. can someone point me out where did I go wrong?</p>