Skip to Content
avatar image
Former Member

How can i generate routing pattern (ex: /requests/1/variant/2/variantCreation/45)?

Hi,

I am using sap.m.router and wants to generate routing pattern as '/requests/1/variant/2/variantCreation/45' where 1,2,45 needs to be passed dynamically.

1) How to pass this values from controller?
2) pattern '/requests/1' already generated, now can i attach 'variant/2/variantCreation/45' to existing pattern (i.e. '/requests/1') on nevigation?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 17 at 10:33 AM

    Hi Parth Patel,

    While declaring the routes in your manifest file, use the foll. code (modify as per your requirement).

    {
    					"pattern": "admin-{id}/manage_user/view-User-{id1}",
    					"name": "manage_user",
    					"target": "manage_user"
    
    
    				}, 

    In your controller, use the foll. code for navigation :

    Your_Router_Variable.navTo("manage_users",{id:dynamicValue1,id1:dynamicValue2});

    Hope this helps,

    Regards,

    Arjun Biswas.

    Add comment
    10|10000 characters needed characters exceeded