Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 2 Support? #253

Open
eltronix opened this issue Apr 4, 2016 · 10 comments
Open

Angular 2 Support? #253

eltronix opened this issue Apr 4, 2016 · 10 comments

Comments

@eltronix
Copy link

eltronix commented Apr 4, 2016

Hi, what's the state of angular 2 support?

@adrienbrunet
Copy link
Collaborator

See Issue #219 . So far, it's not supported. It's getting time to do it though. Do you plan to start it? 😈

@eltronix
Copy link
Author

eltronix commented Apr 4, 2016

Thanks for pointing out the original issue. Unfortunately i'm hopeless when
it comes to frontend matters but I will pass on the word.

We're thinking of building an open source enterprise stack based on django,
REST and modern frontend frameworks like angular. Therefore we're looking
at projects that encapsulate the best patterns. This is how I stumbled on
your project, it provides a pattern for integrating angular and django.
On 4 Apr 2016 2:52 pm, "Adrien Brunet" [email protected] wrote:

See Issue #219 #219 . So
far, it's not supported. It's getting time to do it though. Do you plan to
start it? [image: 😈]


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#253 (comment)

@jkosir
Copy link
Collaborator

jkosir commented Apr 4, 2016

Well I have some time now so I could rewrite my contributions to support angular2.

Anyway we'd first have to decide if we'll be going for a new module or somehow make this compatible with angular2. Due to different managing of static .js files (webpack, jspm) it doesn't make much sense to load javascript parts with pip any more. Also do we use typescript or es6?

Need to start some discussion on these and similar questions.

@jrief
Copy link
Owner

jrief commented Apr 4, 2016

If we can reuse the directives (the HTML part) in Angular2, I'd prefer to reuse the existing project and add a new folder named, say, client2. Then we can reuse the server part and only replace the client part.

@jkosir
Copy link
Collaborator

jkosir commented Apr 16, 2016

In "modern" (es6) web development you wouldn't load a library by adding another script tag, but just npm install it and import it wherever needed. Then you have webpack/JSPM to take care of bundling all the stuff together.

So installing the client side part with pip doesn't make sense any more. While you could probably import js files by path it's unnecessary complex to do so for .js files that are somewhere in python/site-packages directory.

So to go with the flow the client part of django-angular2 has to be available via npm, I would also suggest making a separate repository for it.

http://blog.jhades.org/how-to-create-an-angular-2-library-and-how-to-consume-it-jspm-vs-webpack/

@jkosir
Copy link
Collaborator

jkosir commented Apr 16, 2016

Also we'd basically have to rewrite everything, since it's a completely different framework. I suppose it's best to get started sooner than later, django url reversing is pretty simple to adapt for angular2, not sure about forms though.

@auvipy
Copy link

auvipy commented May 10, 2016

it would be better to start a new project rather then this i believe as angulr 2 is completely different beast [but nicer] beside we should use jinja2 instead of dtl.

@COLABORATI
Copy link

@adrienbrunet
Copy link
Collaborator

@jkosir @jrief Some update here: Emmanuelle Delescolle has been working on a project involving django-rest-framework to use any front end framework afterwards. The idea is to make OPTIONS call and override the metadata generated.

The project is a really early stage right now, we could really benefit from both of your help (or anyone reading this).
The idea is to write adapters for both angular1 & 2. (but also react etc etc...)

The project is mainly build around Ember at the moment. But with a few adapters, we should get something working with angular 1&2 pretty soon. Using something like angular-formly, we can then build forms on the go from our django definition.

We've build this with Emma (@nanuxbe) at django under the hood. Please, give me feedback.
This new project/approach could be a replacement for that library which is sadly stuck on angular1.

http://drf-schema-adapter.readthedocs.io/en/latest/

@timoc
Copy link

timoc commented Jan 23, 2019

Why not try something with Angular 4 that is off the shelf?
https://github.com/mika-el/angular-admin-lte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants