1var routerApp = angular.module('routerApp', ['ui.router']); 2 3if (!String.prototype.format) { 4 /** 5 * String formatter 6 */ 7 String.prototype.format = function() { 8 var args = arguments; 9 return this.replace(/\{(\d+)\}/g, function(match, number) { 10 if (typeof(args) != "undefined" && args.hasOwnProperty(number)) 11 return args[number]; 12 return match; 13 }); 14 }; 15} 16 17// State/view table 18routerApp.config(function($stateProvider, $urlRouterProvider) { 19 $stateProvider 20 .state('home',{url: '/home', templateUrl: 'home.html'}) 21 .state('documentation',{url: '/documentation', templateUrl: 'documentation.html'}) 22 .state('utilities',{url: '/utilities', templateUrl: 'utilities.html'}) 23 .state('support',{url: '/support', templateUrl: 'support.html'}) 24 $urlRouterProvider.otherwise('/home'); 25 //$stickyStateProvider.enableDebug(true); 26}); 27 28routerApp.run(function($rootScope, $state, $window, $timeout) { 29 // Necessary for ui.router 30 $rootScope.$state = $state; 31 $rootScope.$on("$stateChangeStart", function(e, toState, toParams, fromState, fromParams) { 32 console.log("RootScope - State Change Start - {0} -> {1}".format(fromState.name, toState.name)); 33 }); 34 $rootScope.$on("$stateChangeSuccess", function(e, toState, toParams, fromState, fromParams) { 35 console.log("RootScope - State Change Success - {0} -> {1}".format(fromState.name, toState.name)); 36 }); 37});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.