Fix unnecessary requests in angular image panel

When displaying angular image panel, the request to get images is
called twice. This is caused by the setting of routeProvider.
This patch will fix it.

Change-Id: I37db691e846d3b80fa21794922e1998cc23243e3
Closes-Bug: #1615573
This commit is contained in:
Kenji Ishii 2016-08-23 17:26:10 +09:00 committed by Richard Jones
parent 9274624843
commit f91d38bd6e
1 changed files with 4 additions and 4 deletions

View File

@ -331,19 +331,19 @@
var path = $windowProvider.$get().STATIC_URL + 'app/core/images/';
$provide.constant('horizon.app.core.images.basePath', path);
$routeProvider.when('/project/images/:id/', {
$routeProvider.when('/project/images/:id', {
redirectTo: goToAngularDetails
});
$routeProvider.when('/admin/images/:id/detail/', {
$routeProvider.when('/admin/images/:id/detail', {
redirectTo: goToAngularDetails
});
$routeProvider.when('/project/images/', {
$routeProvider.when('/project/images', {
templateUrl: path + 'panel.html'
});
$routeProvider.when('/admin/images/', {
$routeProvider.when('/admin/images', {
templateUrl: path + 'admin-panel.html'
});