Skip to content

Instantly share code, notes, and snippets.

@robwormald
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwormald/9080485 to your computer and use it in GitHub Desktop.
Save robwormald/9080485 to your computer and use it in GitHub Desktop.
angular.module('innit.app',['ionic','innit.auth','innit.storage'])
.provider('$innitApp',function(){
var _appConfig = {
baseUrl : 'http://localhost:1337'
}
var _appState = {
stateDescription : null
}
return {
$get : function(){
return {
config : _appConfig,
state : _appState,
launchParams : function(){}
}
},
setBaseUrl : function(baseUrl){
_appConfig.baseUrl = baseUrl;
}
}
})
.run(function($location,$innitApp){
$innitApp.launchParams = $location.search()
})
.config(function($stateProvider){
$stateProvider.state('app',{
abstract : true,
controller : 'AppController',
templateUrl : 'views/innit.app.html',
url : '/app'
})
$stateProvider.state('app.launcher',{
url : '/launch',
templateUrl : 'views/launcher.html',
controller : 'AppLaunchController'
})
$stateProvider.state('app.login',{
controller : 'AppLoginController',
templateUrl : 'partials/innit.app.login.html',
url : '/login'
})
})
var InnitPocketClock = angular.module('innit.app.pocketclock', ['ionic','innit.app','innit.app.pocketclock.controllers','innit.app.pocketclock.controllers','innit.ui.chronograph']);
InnitPocketClock.config(function($stateProvider, $urlRouterProvider,$innitAppProvider,$locationProvider) {
$innitAppProvider.setBaseUrl('http://localhost:1337');
// $innitAPIProvider.setUrl('http://localhost:1337')
$stateProvider
.state('app.pocketclock',{
abstract : true,
url : '/pocketclock',
templateUrl : 'views/pocketclock.html'
})
.state('app.pocketclock.activityList', {
url: "/list",
templateUrl: "views/activity-list.html",
controller: 'ActivityListCtrl'
})
.state('app.pocketclock.activityFactory', {
url: "/factory",
templateUrl: "views/activity-factory.html",
controller: 'ActivityFactoryCtrl'
})
.state('app.pocketclock.activityConfirm', {
url: "/confirm",
templateUrl: "views/activity-confirm.html",
controller: 'ActivityConfirmCtrl'
})
.state('app.pocketclock.clock', {
url: "/clock",
templateUrl: "views/clock.html",
controller: 'ClockCtrl'
})
.state('app.pocketclock.activityDetail', {
url: "/activity-detail",
templateUrl: "views/activity-detail.html",
controller: 'ActivityDetailCtrl'
})
$stateProvider
.state('timeLogList', {
url: "/list",
templateUrl: "/views/timelog-list.html",
controller: 'TimeLogListCtrl'
})
// if none of the above are matched, go to this one
// $urlRouterProvider.otherwise("/list");
// $locationProvider.html5Mode(true);
// if none of the above are matched, go to this one
$urlRouterProvider.otherwise("/app/launch");
})
// InnitPocketClock.controller('PocketClockCtrl', function($scope, $timeout, $ionicModal, Projects) {
// });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment