You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AngularJS routes are not properly handled by the backend. For example:
/users/create
Results in an unresolved request in the backend. It would be preferred if in this case the back end forwards the URI to AngularJS, so that the template can be resolved in the front end. For example, consider the proposed route:
GET /*any @controllers.Application.main(any)
And the following controller function:
def main(any: String) = Action {
logger.info("Serving index page via AngularJS...")
val javascripts = { ... }
Ok(views.html.index(javascripts))
}
Using this approach, PlayFramework will forward the URI to AngularJS. The drawback in this case is that PlayFramework routes must be different from AngularJS ones to avoid conflicts. This can be solved by adding a prefix to all the asynchronous routes (e.g. /api/users instead of /users). I am not 100% sure this is the best way to solve the problem, so it would be nice to hear more ideas.
The text was updated successfully, but these errors were encountered:
AngularJS routes are not properly handled by the backend. For example:
Results in an unresolved request in the backend. It would be preferred if in this case the back end forwards the URI to AngularJS, so that the template can be resolved in the front end. For example, consider the proposed route:
And the following controller function:
Using this approach, PlayFramework will forward the URI to AngularJS. The drawback in this case is that PlayFramework routes must be different from AngularJS ones to avoid conflicts. This can be solved by adding a prefix to all the asynchronous routes (e.g. /api/users instead of /users). I am not 100% sure this is the best way to solve the problem, so it would be nice to hear more ideas.
The text was updated successfully, but these errors were encountered: