title: migrating from ngRoute to ui.router
body: <p>I have a problem with migrating from ngroute to ui.router:</p>
  
  <p>using ngroute i have couple angular files:</p>
  
  <p>module.js</p>
  
  <pre><code>angular.module('betTogether', ['ngRoute']);
  </code></pre>
  
  <p>route.js</p>
  
  <pre><code>angular.module('betTogether').config(['$routeProvider',
      function (
          $routeProvider
      ) {
            $routeProvider.
                when('/descriptionBets', {
                    templateUrl: 'descriptionBets',
                    controller: 'descriptionBetsCtrl'
                }).
                when('/normalBets', {
                    templateUrl: 'normal',
                    controller: 'normalBetsCtrl'
                }).
                when('/addBet', {
                    templateUrl: 'addBet',
                    controller: 'addBetCtrl'
                }).
                otherwise({
                    redirectTo: '/descriptionBets'
                });
  }]);
  </code></pre>
  
  <p>normalBets.js</p>
  
  <pre><code>angular.module('betTogether').controller('normalBetsCtrl', [
  '$scope','$http',
  
  function($scope,$http){
  
      $scope.typeBetsImages = [{link: "images/basketball.png", title:"basketball"},
                  {link: "images/tenis.png", title: "tenis"},
                  {link: "images/volleyball.png", title: "volleyball"},
                  {link: "images/football.png", title:"football"}
      ];
  
      $http.get("/normalBets").success(function(data){
          $scope.normalBets = data;
      });
  
  }]);
  </code></pre>
  
  <p>...and rest of controllers. And everything works ok.
  Now i want to migrate to ui-router. so i change module.js and route.js like that:</p>
  
  <p>module.js</p>
  
  <pre><code>angular.module('betTogether', ['ui.router']);
  </code></pre>
  
  <p>route.js</p>
  
  <pre><code>angular.module('betTogether').config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){
                  // For any unmatched url, send to /business
                  $urlRouterProvider.otherwise("/descriptionBets")
  
                  $stateProvider
                          .state('descriptionBets', {//State demonstrating Nested views
                              url: "/descriptionBets",
                              templateUrl: "descriptionBets",
                              controller: "descriptionBetsCtrl"
                          })
                          .state('normalBets', {//nested state [products is the nested state of business state]
                              url: "/normalBets",
                              templateUrl: "normal",
                              controller: "normalBetsCtrl"
                          })
                          .state('addBet', {//nested state [services is the nested state of business state]
                              url: "/addBet",
                              templateUrl: "addBet",
                              controller: "addBetCtrl"
                          });
  
              }]);
  </code></pre>
  
  <p>and it doesnt work. i have error:</p>
  
  <pre><code>Error: [$injector:nomod] http://errors.angularjs.org/1.3.10/$injector/nomod?p0=betTogether angular.min.js:6:417
  </code></pre>
  
  <p>... and it is for 1st line of each controllers.</p>
  
  <p>Someone could help me?</p>
  
  <p>PS: sorry for my english, hope You understand all.</p>