As of now with the latest SDK, there is no option in router path to specify optional parameters.
For example: if I want to make the playlistId, an optional field in the below path, it would not be possible.
{
path: 'player/:assetId/:playlistId',
component: Player
}
I would either need to specify two different routes to the same component.
It would be very helpful to have a way to specify optional fields in router path with a '?' suffix for the optional params.
example:
{
path: 'player/:assetId/:playlistId?',
component: Player
}
As of now with the latest SDK, there is no option in router path to specify optional parameters.
For example: if I want to make the playlistId, an optional field in the below path, it would not be possible. { path: 'player/:assetId/:playlistId', component: Player }
I would either need to specify two different routes to the same component.
It would be very helpful to have a way to specify optional fields in router path with a '?' suffix for the optional params.
example: { path: 'player/:assetId/:playlistId?', component: Player }
would route to
http://some/url#player/1 http://some.url#player/1/2