title: angular - index.html recognize only functions defined in the default route
body: <p>I have wired problem in angular.
  in my index.html I have nav bar with ng-click="go('')" for each tab.</p>
  
  <p>'go' is function which defined in each of my controllers.</p>
  
  <pre><code>var sheepApp= angular.module('sheepApp', [
      'ui.bootstrap',
      'ngRoute',
      'firebase'
  ]);
  
  sheepApp.config(['$routeProvider',
    function($routeProvider) {
      $routeProvider.
        when('/home', {
          templateUrl: 'pages/home.html',
          controller: 'homeCtrl'
        }).
        when('/vision', {
          templateUrl: 'pages/vision.html',
          controller: 'visionCtrl'
        }).
        when('/about', {
          templateUrl: 'pages/about.html',
          controller: 'aboutCtrl'
        }).
        when('/gallery', {
          templateUrl: 'pages/gallery.html',
          controller: 'galleryCtrl'
        }).
        when('/videos', {
          templateUrl: 'pages/videos.html',
          controller: 'videosCtrl'
        }).
        otherwise({
          redirectTo: '/home'
        });
    }]);
  </code></pre>
  
  <p>the problem is that the 'go' function (and all others) only recognized if I'm now in the route defined as 'otherwise' (In my case -'home')</p>
  
  <p>Why it can happen?</p>
  
  <p>thanks</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>all my conntollers defined in ctrls.js</p>
  
  <p>example of one of the ctrls:</p>
  
  <pre><code>sheepApp.controller('joinUsCtrl', ['$scope','$rootScope','$location',
      function ($scope, $rootScope,$location) {
          $rootScope.go = function ( path ) {
              $location.path( path );
          };
  
          $rootScope.isActive = function(tabName){
                  return $location.path() == tabName;
          };
  
          $scope.he = he;
  }]);
  </code></pre>