I have a nested a state that is associated with a file path within a directory. That is, the url for the view is something like /workspace/path/to/my/file.txt
. Right now, simply using /:path
does not work. How can ui-router be configured to accept slashes in the middle of a route?
angular.module('myApp')
.config(function ($stateProvider) {
$stateProvider
.state('workspace.file', {
url: '/:path',
parent: 'workspace',
views: {
fileTabs: {
templateUrl: 'app/workspace/workspace.file/file.html',
}
},
controller: 'WorkspaceFileCtrl'
});
});