it should still fix some issue Angular is client-side, twig is server-side, so you cannot call twig's path function from angular. If you want to generate routes on the client, look into FOSJsRoutingBundle.
How can I set "Login" as text for anonymous and "Logout" for authenticated users in twig and symfony
By : Oleksandr Potomkin
Date : March 29 2020, 07:55 AM
I wish this helpful for you I have a menu that all items appear for all users and I want to hide/show specific items to specific ROLE users in symfony2. , In Twig do following check: