Skip to content

Instantly share code, notes, and snippets.

@SirajGadhia
Last active November 23, 2015 19:21
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 SirajGadhia/d94cdfdf9d1cebac597a to your computer and use it in GitHub Desktop.
Save SirajGadhia/d94cdfdf9d1cebac597a to your computer and use it in GitHub Desktop.
AngularJS Main Module - www.Siraj360.com/ng/
//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