ionic app running in browser but breaks on device

Simple navigation from login to another state works in browser but breaking on android device, any idea in such situation what shud i check? because i dont have any error in browser and i dont have any log when running on device so how do i debug?

app.js:
=======

// Ionic Starter App

// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'

var ionicApp = angular.module('feedback-system', ['ionic', 'firebase', 'coursesModule', 'feedbackModule', 'loginModule', 'servicesModule', 'tabsModule', 'notificationModule', 'addCoursesModule']);

ionicApp.run(function($ionicPlatform, $state, $location, $rootScope, $localstorage) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
    if(window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
    }
    if(window.StatusBar) {
      StatusBar.styleDefault();
    }
  });

  $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams)
  {

    if($localstorage.get('login') == 'false')
    {
      $location.path('/login');
      // $state.go('login');
    }
  });
});


ionicApp.config(function($stateProvider, $urlRouterProvider) {
  $stateProvider

  .state('login', {
    url: '/login',
    templateUrl: 'views/login.html',
    controller: 'loginCtrl'
  })

  .state('tabs', {
    url: '/tabs',
    abstract: true,
    templateUrl: 'views/main.html',
    controller: 'tabsCtrl'
  })

  .state('tabs.courses', {
    url: '/courses',
    views:{
      'coursesView':{    
        templateUrl: 'views/courses.html',
        controller: 'coursesCtrl'
      }
    }
  })
  .state('tabs.feedback', {
    url: '/feedback',
    views:{
      'feedbackView':{
        templateUrl: 'views/feedback.html',
        controller: 'feedbackCtrl'
      }
    }
  })

  .state('tabs.notifications', {
    url: '/notifications',
    views:{
      'notificationsView':{
        templateUrl: 'views/notification.html',
        controller: 'notificationCtrl'
      }
    }
  })

  $urlRouterProvider.otherwise("/tabs/courses");

});

services:

var servicesModule = angular.module('servicesModule', ['ionic', 'ngCordova']);

servicesModule.factory('$localstorage', ['$window', function($window) {
  return {
    set: function(key, value) {
      $window.localStorage[key] = value;
    },
    get: function(key) {
      return $window.localStorage[key] || undefined;
    },
    setObject: function(key, value) {
      $window.localStorage[key] = JSON.stringify(value);
    },
    getObject: function(key) {
      return JSON.parse($window.localStorage[key] || '{}');
    }
  }
}]);


servicesModule.service('firebaseReferenceService', ['$state', function($state){
    var ref = new Firebase("https://feedback-system.firebaseio.com/");
    return {firebaseMainAppObjectReference: ref};
}]);

servicesModule.service('loginService', ['$state', '$localstorage', function($state, $localstorage){

    var ref = new Firebase("https://feedback-system.firebaseio.com/");
    var authData = ref.getAuth();

    if (authData) {

        $localstorage.set('login', 'true');

      $state.go('tabs.courses');
      console.log("User " + authData.uid + " is logged in with " + authData.provider);

    } else {

      $state.go('login');
    }

}]);


servicesModule.service('usernameParsingService' , ['$state', '$localstorage', function($state, $localstorage){

    var ref = new Firebase("https://feedback-system.firebaseio.com/");
    var authData = ref.getAuth();
    var userauthen = authData.uid;
    var emailid = authData.password.email.replace(/@.*/,'');

    var completeemail = authData.password.email;

    var stuOrAd = completeemail.includes("student");

    var ln = userauthen.length;

    userauthen = emailid + userauthen.charAt(ln-1);

    var str = userauthen.split(".");

    userauthen = "";
    for (i=0; i<str.length; i++)
    {
      userauthen = userauthen + str[i];
    }

    console.log('stuOrAd : ' + stuOrAd);
    console.log('userauthen : ' + userauthen);

    return {userid: userauthen ,
            checker: stuOrAd};

}]);

I also got such error once.

All state names, folder names & pages are case sensitive. You should check state name, Folders or page names cases(Capital or Small letters).

It works in the browser but when deployed on device it will fail.

Hope this will help