What is the standard way to define urls when using Django,AngularJS and Django-Rest-Framework ?
In other way, is it possible to define SPA urls commonly instead of defining it in both Angular
and Django
?
What is the standard way to define urls when using Django,AngularJS and Django-Rest-Framework ?
In other way, is it possible to define SPA urls commonly instead of defining it in both Angular
and Django
?
Django-Angular actually provides javascript handlers that operate in a similar fashion to the {% url ... %}
template tags and django reverse
functions.
From the django-angular readthedocs on Managing URLs:
Starting with version 0.8, django-angular provides a new way to handle URLs, which offers the reversing functionality directly to AngularJS modules.
This service is provided by
djangoUrl.reverse(name, args_or_kwargs)
method. It behaves exactly like Django’s URL template tag.
Django-Angular provides a lot of helper functions around integrating Django and Angular, and it probably would you checking out.
© 2022 - 2024 — McMap. All rights reserved.