Merge "Support project name in project detail URLs"
This commit is contained in:
commit
bfeda58768
@ -34,8 +34,16 @@ angular.module('sb.projects').controller('ProjectDetailController',
|
||||
|
||||
// Parse the ID
|
||||
var id = $stateParams.hasOwnProperty('id') ?
|
||||
parseInt($stateParams.id, 10) :
|
||||
null;
|
||||
$stateParams.id : null;
|
||||
|
||||
if (!isNaN(id)) {
|
||||
id = parseInt(id, 10);
|
||||
}
|
||||
|
||||
if (id === null) {
|
||||
$state.go('sb.index');
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* UI flag for when we're initially loading the view.
|
||||
|
@ -44,7 +44,7 @@ angular.module('sb.projects',
|
||||
controller: 'ProjectListController'
|
||||
})
|
||||
.state('sb.project.detail', {
|
||||
url: '/{id:[0-9]+}',
|
||||
url: '/{id:any}',
|
||||
templateUrl: 'app/projects/template/detail.html',
|
||||
controller: 'ProjectDetailController'
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user