I gave a talk at Djangocon earlier this week on Angular 2 and Django REST – not so much an intro to Angular 2 (you can go through a tutorial for that), but talking about why Angular 2 is something to pay attention to, plus looking at how you might use Angular 2 and a framework like Django REST together.
Why pay attention to Angular 2?
Three important points:
- Deploy to any target
- Choose your own language
- Web components
Deploy to any target. Unlike Angular 1, Angular 2 doesn’t have a baked in conception of the DOM. That’s a really big deal! It means you can use Angular 2 in places without a concept of the DOM, such as building cross-platform apps with NativeScript. That’s awesome!
Web components. Web components are awesome! But … the browser standards aren’t quite there. Angular 2’s components are meant to be future-forward compatible with web components (when we eventually get them), so you can start using this architecture today in the context of a framework that’s performant.
The last API I built in Django was using Tastypie, but for this talk I wanted to use Django REST since it’s gaining steam in the Django community. And wow, is that thing pretty cool! With fairly little configuration, you get a web-browseable API, with all the methods working (GET, POST, DELETE, etc.). The quickstart tutorial is nice and fast, so check it out!
You can see the slides online, and check out the example project on Github.
6 Replies to “Angular 2 and Django too”
Hi, this is my first year in the software development world and I have been doing Django Rest and Angular1 for a few months now and I want to move to Angular2 but I have been searching for Django + Angular2 for weeks and I couldn’t find anything. can you please send me a link to your talk or to any resource that can help me please.
Hi Osman! The slides are linked here: pselle.github.io/angular2andyou. The talk was recorded, so I expect a video to be up, when it is, I expect it’ll be on Confreaks.tv
Thanks I really Appreciate it
It doesn’t display any of the dinosaurs added in django rest in angular app, I don’t know if I have done sth wrong or if I didn’t do sth necessary.
This presentation is now on YouTube: https://www.youtube.com/watch?v=QlZbj8UAYkw
Thanks for the informative session. I’m new to Django and Angular, and this has helped immensely!