Closed (fixed)
Project:
Drupal Js Path
Version:
1.0.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2023 at 14:03 UTC
Updated:
28 Jul 2023 at 03:44 UTC
Jump to comment: Most recent
It would be good to explain use cases or examples for the use of the module
Comments
Comment #2
praveen3555 commentedwe can use it like
1. Drupal.path('entity.node.canonical', {'node': 7})
2. Drupal.alias('entity.node.canonical', {'node': 7})
The first parameter would be the route name like the one provided above and the second parameter would be parameters which will be required to that route.
Responses for the above would be like this
1. {path: '/node/7'}
2. {path: '/unicorn'}
If we want absolute URL or other options that to be added to that route, we need to add it as a third parameter
Comment #3
praveen3555 commentedComment #4
praveen3555 commentedComment #5
praveen3555 commentedComment #6
praveen3555 commented