From d10fa4e1bb60da4cecf6f06e0aa86cc517d26647 Mon Sep 17 00:00:00 2001
From: Sander Garretsen
Date: Wed, 12 Oct 2016 11:24:23 +0200
Subject: [PATCH] Use explicit dependency injection for configuration functions
---
index.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/index.html b/index.html
index 4b764e8..2ee5511 100644
--- a/index.html
+++ b/index.html
@@ -217,9 +217,9 @@ Activate the HTML5 mode
// app/scripts/app.js
-angular.module('newProjectApp').config(function($locationProvider) {
+angular.module('newProjectApp').config(['$locationProvider', function($locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
-});
+}]);
OAuth 2.0 Server
@@ -340,9 +340,9 @@ HTML5 mode ON
The oauth directive works just straight when the HTML5 mode is active.
+ }]);
HTML5 mode OFF
@@ -356,12 +356,12 @@ HTML5 mode OFF
$routeProvider
.when('/access_token=:accessToken', {
template: '',
- controller: function ($location, AccessToken) {
+ controller: ['$location', 'AccessToken', function($location, AccessToken) {
var hash = $location.path().substr(1);
AccessToken.setTokenFromString(hash);
$location.path('/');
$location.replace();
- }
+ }]
})
...