Skip to content

Instantly share code, notes, and snippets.

@jabyrd3
Created May 8, 2014 15:15
Show Gist options
  • Select an option

  • Save jabyrd3/d2718ea9c07a8eaf0a7a to your computer and use it in GitHub Desktop.

Select an option

Save jabyrd3/d2718ea9c07a8eaf0a7a to your computer and use it in GitHub Desktop.
app.js
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'myApp.filters',
'myApp.services',
'myApp.directives',
'myApp.controllers',
'ngResource',
'ui.bootstrap',
'hmTouchEvents',
'ui.bootstrap',
'ngTouch'
]).
config(['$routeProvider',
function($routeProvider) {
//this is all test / POC stuff, will be removed as we procceed.
$routeProvider.when('/view1', {
templateUrl: 'partials/partial1.html',
controller: 'MyCtrl1'
});
$routeProvider.when('/view2', {
templateUrl: 'partials/partial2.html',
controller: 'MyCtrl2'
});
$routeProvider.when('/view4', {
templateUrl: 'partials/partial4.html'
});
$routeProvider.when('/filters', {
templateUrl: 'partials/filters.html',
controller: 'filters'
});
//this is how we do reports now; definitions are in reports.js; in the resolve call you need to return the name of the report from the definition.
$routeProvider.when('/testReport', {
templateUrl: 'partials/report.html',
controller: 'reportController',
resolve: {
reportName: function() {
return 'report1'
}
}
});
$routeProvider.when('/testReport2', {
templateUrl: 'partials/report.html',
controller: 'reportController',
resolve: {
reportName: function() {
return 'report2'
}
}
});
$routeProvider.otherwise({
redirectTo: '/view1'
});
}
]);
@jabyrd3
Copy link
Author

jabyrd3 commented May 8, 2014

testing gist-it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment