var dailyIslamicTips = angular.module('dailyIslamicTips', ['ui.router', 'ui.bootstrap' ,'ui.bootstrap.tpls',
'ngResource', 'dailyIslamicTips.services', 'dailyIslamicTips.controller']);
dailyIslamicTips.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
$stateProvider
.state('dashboard', {
url: '/dashboard',
templateUrl: '/templates/dashboard.html',
controller: 'ReminderListController'
})
.state('newReminder' , {
url: '/dashboard/reminder/new',
onEnter: ['$stateParams', '$state', '$uibModal', '$resource', function($stateParams, $state, $uibModal, $resource) {
$uibModal.open({
templateUrl: "/templates/create-reminder.html",
controller: 'ReminderCreateController',
}).result.finally(function() {
$state.go('dashboard');
});
}],
})
.state('settings', {
url: '/settings',
templateUrl: '/templates/settings.html'
})
.state('help', {
url: '/help',
templateUrl: '/templates/help.html'
});
$locationProvider.html5Mode(true);
}).run(function($state) {
$state.go('dashboard');
});