Merge pull request #1498 from ostcar/ui-router-pattern
Altered ui-router definitions
This commit is contained in:
commit
acc01bd2b6
@ -1,6 +1,9 @@
|
|||||||
angular.module('OpenSlidesApp.core', [])
|
angular.module('OpenSlidesApp.core', [])
|
||||||
|
|
||||||
.config(function($stateProvider) {
|
.config(function($stateProvider, $urlMatcherFactoryProvider) {
|
||||||
|
// Make the trailing slash optional
|
||||||
|
$urlMatcherFactoryProvider.strictMode(false)
|
||||||
|
|
||||||
// Use stateProvider.decorator to give default values to our states
|
// Use stateProvider.decorator to give default values to our states
|
||||||
$stateProvider.decorator('views', function(state, parent) {
|
$stateProvider.decorator('views', function(state, parent) {
|
||||||
var result = {},
|
var result = {},
|
||||||
@ -56,7 +59,9 @@ angular.module('OpenSlidesApp.core', [])
|
|||||||
create: '/new',
|
create: '/new',
|
||||||
update: '/edit',
|
update: '/edit',
|
||||||
list: '',
|
list: '',
|
||||||
detail: '/:id',
|
// The id is expected to be an integer, if not, the url has to
|
||||||
|
// be defined manually
|
||||||
|
detail: '/{id:int}',
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultUrl = defaultUrls[_.last(patterns)];
|
defaultUrl = defaultUrls[_.last(patterns)];
|
||||||
|
Loading…
Reference in New Issue
Block a user