Created
September 3, 2014 01:44
-
-
Save jongravois/b936b9f35d66c92ee49f to your computer and use it in GitHub Desktop.
app.js file using ui-router
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
(function(){ | |
$(document).ready(function(){ | |
$('.flashmsg').delay(3000).fadeOut(300); | |
//alert($('#user_id').data('id')); | |
}); | |
var ARM = angular.module('ARM', [ | |
'ui.router', 'ui.bootstrap', 'ui.utils', 'ngSanitize', 'ui.select', 'multi-select' | |
]); | |
ARM.constant('_', window._) | |
.run(function ($rootScope) { | |
$rootScope._ = window._; | |
}); | |
ARM.config(function($stateProvider, $urlRouterProvider){ | |
$stateProvider | |
.state('home', { | |
url: '/', | |
templateUrl: '/ang/views/landing.html', | |
controller: 'MainController' | |
}) | |
.state('prefs', { | |
url: '/prefs', | |
templateUrl: '/ang/views/prefs.html' | |
}) | |
.state('new', { | |
abstract: true, | |
url: '/new', | |
templateUrl: '/ang/views/new/newApp.html', | |
controller: 'NewAppController' | |
}) | |
.state('new.farmer', { | |
url: '/farmer', | |
templateUrl: '/ang/views/new/farmer.html' | |
}) | |
.state('new.applicant', { | |
url: '/applicant', | |
templateUrl: '/ang/views/new/applicant.html' | |
}) | |
.state('new.partner', { | |
url: '/partner', | |
templateUrl: '/ang/views/new/partner.html' | |
}) | |
.state('new.joint', { | |
url: '/joint', | |
templateUrl: '/ang/views/new/joint.html' | |
}) | |
.state('new.corp', { | |
url: '/corp', | |
templateUrl: '/ang/views/new/corp.html' | |
}) | |
.state('new.quest', { | |
url: '/quest', | |
templateUrl: '/ang/views/new/quest.html' | |
}) | |
.state('new.states', { | |
url: '/states', | |
templateUrl: '/ang/views/new/states.html' | |
}) | |
.state('new.counties', { | |
url: '/counties', | |
templateUrl: '/ang/views/new/counties.html' | |
}) | |
.state('new.farms', { | |
url: '/farms', | |
templateUrl: '/ang/views/new/farms.html' | |
}) | |
.state('new.crops', { | |
url: '/crops', | |
templateUrl: '/ang/views/new/crops.html' | |
}) | |
.state('new.farmdetails', { | |
url: '/farmdetails', | |
templateUrl: '/ang/views/new/farmdetails.html' | |
}) | |
.state('new.insurance', { | |
url: '/insurance', | |
templateUrl: '/ang/views/new/insurance.html' | |
}) | |
.state('new.income', { | |
url: '/income', | |
templateUrl: '/ang/views/new/income.html' | |
}) | |
.state('new.yields', { | |
url: '/yields', | |
templateUrl: '/ang/views/new/yields.html' | |
}) | |
.state('new.acres', { | |
url: '/acres', | |
templateUrl: '/ang/views/new/acres.html' | |
}) | |
.state('new.expense', { | |
url: '/expense', | |
templateUrl: '/ang/views/new/expenses.html' | |
}) | |
.state('new.checkout', { | |
url: '/checkout', | |
templateUrl: '/ang/views/new/checkout.html' | |
}) | |
.state('edit', { | |
abstract: true, | |
url: '/edit', | |
templateUrl: '/ang/views/edit/editapp.html', | |
controller: 'EditAppController' | |
}) | |
.state('edit.id', { | |
url: '/:id', | |
templateUrl: '/ang/views/edit/summary.html', | |
controller: function($scope, $stateParams) { | |
$scope.id = $stateParams.id; | |
} | |
}) | |
.state('edit.farmer', { | |
url: '/farmer', | |
templateUrl: '/ang/views/edit/farmer.html' | |
}) | |
.state('edit.applicant', { | |
url: '/applicant', | |
templateUrl: '/ang/views/edit/applicant.html' | |
}) | |
.state('edit.partner', { | |
url: '/partner', | |
templateUrl: '/ang/views/edit/partner.html' | |
}) | |
.state('edit.joint', { | |
url: '/joint', | |
templateUrl: '/ang/views/edit/joint.html' | |
}) | |
.state('edit.corp', { | |
url: '/corp', | |
templateUrl: '/ang/views/edit/corp.html' | |
}) | |
.state('edit.quests', { | |
url: '/quests', | |
templateUrl: '/ang/views/edit/quests.html' | |
}) | |
.state('edit.states', { | |
url: '/states', | |
templateUrl: '/ang/views/edit/states.html' | |
}) | |
.state('edit.farms', { | |
url: '/farms', | |
templateUrl: '/ang/views/edit/farms.html' | |
}) | |
.state('edit.crops', { | |
url: '/crops', | |
templateUrl: '/ang/views/edit/crops.html' | |
}) | |
.state('edit.yield', { | |
url: '/yield', | |
templateUrl: '/ang/views/edit/yield.html' | |
}) | |
.state('edit.acres', { | |
url: '/acres', | |
templateUrl: '/ang/views/edit/acres.html' | |
}) | |
.state('edit.insurance', { | |
url: '/insurance', | |
templateUrl: '/ang/views/edit/insurance.html' | |
}) | |
.state('edit.farmdetails', { | |
url: '/farmdetails', | |
templateUrl: '/ang/views/edit/farmdetails.html' | |
}) | |
.state('edit.budgets', { | |
url: '/budgets', | |
templateUrl: '/ang/views/edit/budgets.html' | |
}) | |
.state('edit.optimizer', { | |
url: '/optimizer', | |
templateUrl: '/ang/views/edit/optimizer.html' | |
}) | |
.state('edit.structure', { | |
url: '/structure', | |
templateUrl: '/ang/views/edit/structure.html' | |
}) | |
.state('edit.summary', { | |
url: '/summary', | |
templateUrl: '/ang/views/edit/summary.html' | |
}) | |
.state('management', { | |
url: '/management', | |
templateUrl: '/ang/views/management.html', | |
controller: 'ManagementController' | |
}) | |
.state('disbursement', { | |
url: '/disbursement', | |
templateUrl: '/ang/views/disbursement.html', | |
controller: 'DisbursementController' | |
}) | |
.state('admin', { | |
url: '/admin', | |
templateUrl: '/ang/views/admin/home.html', | |
controller: 'AdminController' | |
}) | |
.state('reports', { | |
url: '/rpts', | |
templateUrl: '/ang/views/reports/home.html', | |
controller: 'ReportsController' | |
}) | |
.state('reports.actdet', { | |
url: '/actdet', | |
templateUrl: '/ang/views/reports/activity_detail.html' | |
}) | |
.state('reports.cusbud', { | |
url: '/cusbud', | |
templateUrl: '/ang/views/reports/customer_budget.html' | |
}) | |
.state('reports.accrecon', { | |
url: '/accrecon', | |
templateUrl: '/ang/views/reports/account_reconcilliation.html' | |
}) | |
.state('reports.lnman', { | |
url: '/lnman', | |
templateUrl: '/ang/views/reports/loan_management.html' | |
}) | |
.state('reports.actsum', { | |
url: '/actsum', | |
templateUrl: '/ang/views/reports/activity_summary.html' | |
}) | |
.state('reports.avcred', { | |
url: '/avcred', | |
templateUrl: '/ang/views/reports/available_credit.html' | |
}) | |
.state('reports.cfarm', { | |
url: '/cfarm', | |
templateUrl: '/ang/views/reports/cfarm.html' | |
}) | |
.state('reports.fmrhis', { | |
url: '/fmrhis', | |
templateUrl: '/ang/views/reports/farmer_history.html' | |
}) | |
.state('reports.crpmix', { | |
url: '/crpmix', | |
templateUrl: '/ang/views/reports/crop_mix.html' | |
}) | |
.state('reports.comapp', { | |
url: '/comapp', | |
templateUrl: '/ang/views/reports/committee_approval.html' | |
}) | |
.state('reports.comcom', { | |
url: '/comcom', | |
templateUrl: '/ang/views/reports/committee_comment.html' | |
}) | |
.state('reports.repcus', { | |
url: '/repcus', | |
templateUrl: '/ang/views/reports/repeat_customer.html' | |
}) | |
.state('reports.usradt', { | |
url: '/usradt', | |
templateUrl: '/ang/views/reports/user_audit.html' | |
}) | |
$urlRouterProvider.otherwise('/'); | |
}); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment