Skip to content

Commit d2b34b7

Browse files
committed
Don't strip trailing slashes from the resource URL by escaping the slash.
This change required an update to AngularJS ~1.3.0 which currently resolves 1.3.0-rc.2. This is the thing we needed: angular/angular.js#5560 The feature is documented in the AngularJS API reference: https://docs.angularjs.org/api/ngResource/service/$resource
1 parent 600457a commit d2b34b7

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

app/scripts/app.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ angular
3030
'delete-tag-controller',
3131
'delete-repository-controller',
3232
])
33-
.config(['$routeProvider', function($routeProvider){
33+
.config(['$routeProvider', '$resourceProvider', function($routeProvider, $resourceProvider){
34+
35+
// Don't strip trailing slashes from calculated URLs
36+
$resourceProvider.defaults.stripTrailingSlashes = false;
37+
3438
$routeProvider.
3539
when('/home', {
3640
templateUrl: 'views/home.html',

bower.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
"name": "docker-registry-frontend",
33
"version": "0.0.0",
44
"dependencies": {
5-
"angular": "~1.2.0",
5+
"angular": "~1.3.0",
66
"json3": "~3.3.1",
77
"es5-shim": "~3.1.0",
88
"bootstrap": "~3.2.0",
9-
"angular-resource": "~1.2.24",
10-
"angular-cookies": "~1.2.0",
11-
"angular-sanitize": "~1.2.0",
12-
"angular-animate": "~1.2.0",
13-
"angular-touch": "~1.2.0",
14-
"angular-route": "~1.2.0",
9+
"angular-resource": "~1.3.0",
10+
"angular-cookies": "~1.3.0",
11+
"angular-sanitize": "~1.3.0",
12+
"angular-animate": "~1.3.0",
13+
"angular-touch": "~1.3.0",
14+
"angular-route": "~1.3.0",
1515
"toastr": "~2.0.3"
1616
},
1717
"devDependencies": {
18-
"angular-mocks": "~1.2.0",
19-
"angular-scenario": "~1.2.0"
18+
"angular-mocks": "~1.3.0",
19+
"angular-scenario": "~1.3.0"
2020
},
2121
"appPath": "app"
2222
}

0 commit comments

Comments
 (0)