Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. angular.module('starter.controllers', [])
  2. .controller('AppCtrl', function($scope,$state,$stateParams,$rootScope){
  3.  
  4. });
  5.  
  6. // Ionic Starter App
  7.  
  8. // angular.module is a global place for creating, registering and retrieving Angular modules
  9. // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
  10. // the 2nd parameter is an array of 'requires'
  11. angular.module('starter', ['ionic', 'starter.controllers'])
  12.  
  13. .run(function($ionicPlatform) {
  14. $ionicPlatform.ready(function() {
  15. // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
  16. // for form inputs)
  17. if(window.cordova && window.cordova.plugins.Keyboard) {
  18. cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  19. }
  20. if(window.StatusBar) {
  21. StatusBar.styleDefault();
  22. }
  23. });
  24. })
  25. .config(function($stateProvider, $urlRouterProvider) {
  26. $stateProvider
  27. .state('navBar', {
  28. url: "/navBar",
  29. abstract: true,
  30. templateUrl: "templates/navigationBar.html",
  31. controller:'AppCtrl'
  32.  
  33. })
  34. .state('navBar.orderReceive', {
  35. url: "/orderReceive",
  36. views: {
  37. 'orderReceiveView': {
  38. templateUrl: "templates/OrderReceiveChoice.html"
  39.  
  40.  
  41. }
  42. }
  43. })
  44.  
  45. $urlRouterProvider.otherwise(function ($injector) {
  46. var $state = $injector.get('$state');
  47. $state.go('navBar.orderReceive');
  48. });
  49.  
  50. })
  51.  
  52. TypeError: Cannot read property 'controller' of undefined
  53. at IonicModule.controller.self.update (ionic.bundle.js:51695)
  54. at IonicModule.controller.self.beforeEnter (ionic.bundle.js:52135)
  55. at IonicModule.controller.self.beforeEnter (ionic.bundle.js:54079)
  56. at Scope.$get.Scope.$emit (ionic.bundle.js:24919)
  57. at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.emit (ionic.bundle.js:50634)
  58. at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.transition (ionic.bundle.js:50492)
  59. at ionic.bundle.js:52121
  60. at ionic.bundle.js:50370
  61. at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.render (ionic.bundle.js:50459)
  62. at Object.IonicModule.factory.ionicViewSwitcher.create.switcher.init (ionic.bundle.js:50369)(anonymous function) @ ionic.bundle.js:21157$get @ ionic.bundle.js:17936$get.Scope.$emit @ ionic.bundle.js:24921IonicModule.factory.ionicViewSwitcher.create.switcher.emit @ ionic.bundle.js:50634IonicModule.factory.ionicViewSwitcher.create.switcher.transition @ ionic.bundle.js:50492(anonymous function) @ ionic.bundle.js:52121(anonymous function) @ ionic.bundle.js:50370IonicModule.factory.ionicViewSwitcher.create.switcher.render @ ionic.bundle.js:50459IonicModule.factory.ionicViewSwitcher.create.switcher.init @ ionic.bundle.js:50369IonicModule.controller.self.render @ ionic.bundle.js:52115IonicModule.controller.self.register @ ionic.bundle.js:52073updateView @ ionic.bundle.js:57485IonicModule.directive.compile @ ionic.bundle.js:57469invokeLinkFn @ ionic.bundle.js:17477nodeLinkFn @ ionic.bundle.js:16977compositeLinkFn @ ionic.bundle.js:16368nodeLinkFn @ ionic.bundle.js:16972compositeLinkFn @ ionic.bundle.js:16368nodeLinkFn @ ionic.bundle.js:16972compositeLinkFn @ ionic.bundle.js:16368nodeLinkFn @ ionic.bundle.js:16972compositeLinkFn @ ionic.bundle.js:16368publicLinkFn @ ionic.bundle.js:16243IonicModule.controller.self.appendViewElement @ ionic.bundle.js:52259IonicModule.factory.ionicViewSwitcher.create.switcher.render @ ionic.bundle.js:50449IonicModule.factory.ionicViewSwitcher.create.switcher.init @ ionic.bundle.js:50369IonicModule.controller.self.render @ ionic.bundle.js:52115IonicModule.controller.self.register @ ionic.bundle.js:52073updateView @ ionic.bundle.js:57485(anonymous function) @ ionic.bundle.js:57462$get.Scope.$broadcast @ ionic.bundle.js:24992$state.transitionTo.$state.transition.resolved.then.$state.transition @ ionic.bundle.js:44836processQueue @ ionic.bundle.js:23394(anonymous function) @ ionic.bundle.js:23410$get.Scope.$eval @ ionic.bundle.js:24673$get.Scope.$digest @ ionic.bundle.js:24484$get.Scope.$apply @ ionic.bundle.js:24778done @ ionic.bundle.js:19191completeRequest @ ionic.bundle.js:19363requestLoaded @ ionic.bundle.js:19304
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement