Last active
November 23, 2015 19:21
-
-
Save SirajGadhia/d94cdfdf9d1cebac597a to your computer and use it in GitHub Desktop.
AngularJS Main Module - www.Siraj360.com/ng/
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
//http://www.siraj360.com/ng/ :: A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5. | |
(function () { | |
//define main module | |
angular.module('FD360', [ | |
'ngRoute', 'ngAnimate', 'ngMessages', 'Filter360', 'Directive360', 'angularCharts', 'ui.bootstrap' | |
]); | |
//app config | |
angular.module('FD360').config(['$routeProvider', '$locationProvider', config360]); | |
function config360($routeProvider, $locationProvider) | |
{ | |
$routeProvider. | |
when('/EmployeeDashboard', { | |
templateUrl: 'app/templates/employee_dashboard.html', | |
controller: 'EmployeeController' | |
}). | |
when('/CoursesAdmin', { | |
templateUrl: 'app/templates/courses_admin.html', | |
controller: 'CoursesAdminController', | |
controllerAs: 'vm' | |
}). | |
when('/KPI', { | |
templateUrl: 'app/templates/kpi.html', | |
controller: 'KPIController' | |
}). | |
when('/', { | |
templateUrl: 'app/templates/home.html', | |
controller: 'HomeController', | |
controllerAs: 'vm' | |
}). | |
when('/Home', { | |
templateUrl: 'app/templates/home.html', | |
controller: 'HomeController', | |
controllerAs: 'vm' | |
}). | |
otherwise({ | |
redirectTo: '/' | |
}); | |
$locationProvider.html5Mode({ | |
enabled: true, | |
requireBase: false | |
}); | |
} | |
})(); | |
//Download of full application at https://github.com/SirajGadhia/FD360-V2-AngularJS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment