Created
November 29, 2013 08:18
-
-
Save robwormald/7702862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//state objects | |
var login = { | |
name: 'login', | |
url: '/login', | |
views: { | |
'workflow' : { | |
templateUrl : '/views/login.html', | |
controller: 'LoginCtrl' | |
} | |
} | |
} | |
var loading = { | |
name: 'loading', | |
url: '/loading', | |
views: { | |
'workflow' : { | |
templateUrl: '/views/loader.html', | |
controller: 'LoadingCtrl' | |
} | |
} | |
} | |
var timeclock = { | |
name: 'timeclock', | |
url: '/timeclock', | |
views: { | |
'header' : { | |
templateUrl: '/partials/header-navbar.html' | |
}, | |
'workflow' : { | |
templateUrl : '/views/google_timeclock.html', | |
controller: 'ClockFlowController' | |
}, | |
'workflow-nav' : { | |
templateUrl : '/partials/workflow-nav.html', | |
// controller: 'NavbarCtrl' | |
} | |
} | |
} | |
var timesheet = { | |
name: 'timesheet', | |
url: '/timesheet', | |
views: { | |
'workflow' : { | |
templateUrl : '/views/timesheet.html', | |
// controller: 'TimesheetCtrl' | |
}, | |
// 'clock@timeclock' : { | |
// templateUrl: '/partials/timeclock.clock.html', | |
// controller: 'ClockCtrl' | |
// }, | |
// 'activityList@timeclock' : { | |
// templateUrl: '/partials/timeclock.activity-list.html', | |
// controller : "ActivityListCtrl" | |
// }, | |
'workflow-nav' : { | |
templateUrl : '/partials/workflow-nav.html', | |
controller: 'NavbarCtrl' | |
} | |
} | |
} | |
InnitPocketClock.run(['$http','$rootScope', '$state', '$stateParams', | |
function ($inject,$http,$rootScope, $state, $stateParams, TimeClock) { | |
$rootScope.$state = $state; | |
$rootScope.$stateParams = $stateParams; | |
} | |
]) | |
InnitPocketClock.config(function ($stateProvider, $urlRouterProvider, $locationProvider,RestangularProvider,InnitModelProvider) { | |
// For any unmatched url, send to /timeclock | |
$urlRouterProvider.otherwise("/login") | |
$stateProvider.state(timeclock) | |
$stateProvider.state(timesheet) | |
$stateProvider.state(login) | |
$stateProvider.state(loading) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment