-
-
Save slattery/6803088 to your computer and use it in GitHub Desktop.
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
angular.module('MyApp', ['racer.js']). | |
config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { | |
//$locationProvider.html5Mode(true); | |
$routeProvider. | |
when('/', { templateUrl: 'partials/home.htm', controller: IndexCtrl, resolve: IndexCtrl.resolve }) | |
otherwise({redirectTo: '/'}); | |
}]); | |
function Ctrl($scope, model) { | |
// model is exactly a racerjs model. See http://derbyjs.com/#model_features for details. | |
} | |
Ctrl.resolve = { | |
model: function (racer) { | |
return racer; | |
} | |
}; | |
Ctrl.resolve.model.$inject = ['racer']; | |
Ctrl.$inject = ['$scope', 'model']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment