FriendsOfSymfony / FOSJsRoutingBundle

A pretty nice way to expose your Symfony routing to client applications.
1.48k stars 261 forks source link

[Question] how to handle unknown routes for angular js #324

Open awolder opened 6 years ago

awolder commented 6 years ago

Hi, I am using a symfony backend, and an angular js front end. The FOSJsRoutingBundle works great in angular controllers IF the route has been exposed, however, if a referenced route is not exposed, it breaks the entire angular app. Is there a way to better handle unknown routes? For example, if a route exists, but the user does not have access to it, the angular http process gives me a rejection with an internal server error, which at least I can catch and present an error message without breaking the app. Overall - I like this bundle for how it simplifies my life with angular :)