Created
May 8, 2014 15:15
-
-
Save jabyrd3/d2718ea9c07a8eaf0a7a to your computer and use it in GitHub Desktop.
app.js
This file contains hidden or 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
| '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' | |
| }); | |
| } | |
| ]); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
testing gist-it