Ionic bundle brakes the application loading


#1

Hello,

I started to play with Ionic before several days and try to solve some issue.

Today I installed Ionic, v0.9.25 (instead 0.9.24).

This is a header configuration:

    <script src="lib/js/ionic.js"></script>
    <script src="lib/js/angular/angular.js"></script>
    <script src="lib/js/angular/angular-animate.js"></script>
    <script src="lib/js/angular/angular-route.js"></script>
    <script src="lib/js/angular/angular-touch.js"></script>
    <script src="lib/js/angular/angular-sanitize.js"></script>
    <script src="lib/js/angular-ui/angular-ui-router.js"></script>
    <script src="lib/js/ionic-angular.js"></script>

    <script type="text/javascript" src="cordova.js"></script>
    <script src="js/app.js"></script>
    <script src="js/services.js"></script>
    <script src="js/controllers.js"></script>
    <script src="js/plugin.js"></script>

In this case my application loads properly.

However, when I try to set instead ionic.bundle.min.js:

   <script src="lib/js/ionic.bundle.min.js"></script>              
    <script src="lib/js/angular/angular-route.js"></script>
    <script src="lib/js/angular/angular-touch.js"></script>
    <script src="lib/js/angular/angular-sanitize.js"></script>

I can’t call controllers. My brakepoint in Chrome points to $urlRouterProvider.otherwise('/tab/pets'); after that - nothing happen, no errors in console.

Here is sources:

app.js

var appSer =  angular.module('todo.services', []);
var appCtrl = angular.module('todo.controllers', []);
var app =     angular.module('todo', ['ionic', 'todo.services', 'todo.controllers']);
app.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
      .state('tab', {
  url: "/tab",
  abstract: true,
  templateUrl: "templates/tabs.html"
})
// the pet tab has its own child nav-view and history
.state('tab.pet-index', {
  url: '/pets',
  views: {
    'pets-tab': {
      templateUrl: 'templates/pet-index.html',
      controller: 'PetIndexCtrl'
    }
  }
})
.state('tab.pet-detail', {
  url: '/pet/:petId',
  views: {
    'pets-tab': {
      templateUrl: 'templates/pet-detail.html',
      controller: 'PetDetailCtrl'
    }
  }
});
 // if none of the above states are matched, use this as the fallback
 $urlRouterProvider.otherwise('/tab/pets');
});

controllers.js

appCtrl.controller('PetIndexCtrl', function($scope, PetService) {
 // "Pets" is a service returning mock data (services.js)
  $scope.pets = PetService.all();
});


appCtrl.controller('PetDetailCtrl', function($scope, $stateParams, PetService) {
 // "Pets" is a service returning mock data (services.js)
  $scope.pet = PetService.get($stateParams.petId);
});

Do I miss something?

[EDIT]

I works with the following configuration:

<script src="lib/js/ionic.bundle.min.js"></script> 
<script src="lib/js/ionic-angular.js"></script>    
<script src="lib/js/angular/angular-sanitize.js"></script>    
<script src="lib/js/angular/angular-touch.js"></script>

But from bundle:

/*!
 * ionic.bundle.js is a concatenation of:
 * ionic.js, angular.js, angular-animate.js,
 * angular-ui-router.js, and ionic-angular.js
 */

Thanks,


#2

Hey would you mind just throwing it up on a codepen or jsfiddle quick so we can step through and see what’s breaking?