Merge url of angular and Django
Asked Answered
C

1

6

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 ?

Cent answered 5/3, 2015 at 20:5 Comment(0)
A
2

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.

Abc answered 5/3, 2015 at 23:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.