Closed Xstoudi closed 3 years ago
The makeUrl signature indicate that the second parameter can be a MakeUrlOptions :
makeUrl
MakeUrlOptions
public makeUrl( routeIdentifier: string, params?: any[] | MakeUrlOptions, options?: MakeUrlOptions ): string
But when passing a MakeUrlOptions as a second parameter:
router.makeUrl('/posts', { prefixUrl: '/api' })
it returns /posts when /api/posts is expected.
/posts
/api/posts
v5.2.1
v15.11.0
router.makeUrl('/posts', { prefixUrl: '/api' }) // /posts
and
router.makeUrl('/posts', undefined, { prefixUrl: '/api' }) // /api/posts
Closing since not actionable
The
makeUrl
signature indicate that the second parameter can be aMakeUrlOptions
:But when passing a
MakeUrlOptions
as a second parameter:it returns
/posts
when/api/posts
is expected.Package version
v5.2.1
Node.js and npm version
v15.11.0
Sample Code (to reproduce the issue)
and