Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
avstuff3308yDjango Rest framework is great! Serializers should help to represent the data the way angular can digest. Also, Should you not also be able to process your objects and flatten them to arrays in the angular controllers? Double also, isn't an array in JavaScript simply a numerical indexed object as JavaScript can be either object or array notation. foo.bar is the same as foo["bar"].
-
jstaiyou7108y@avstuff all I know is an error saying it can't work with [object object] of type Object (wtf)
I'm new at Javascript, Typescript, Angular 2, Python, Django and Django Rest.
All the time I can spend on the project is 3 hours a day and anything I do not know is a thing I need to spend more than a little to learn.
Bad thing is I feel sad because being at college, there's no teacher nor course which teach me all that.
Good thing is I'm allowed to spend time learning all that. And of course, I enjoy it as hell -
avstuff3308yI didn't realize typescript was involved. I do not have any experience with a strong typed js, I wonder if this might be the reason for the errors. Introducing typing into js might force you to change the output of the rest framework or utilize the controller as an object to array step. Manually creating the output from Django rest would defeat many of the wonderful things the Django rest can do for you though. A better option might be to simply find out what angular options are available for digesting an object.
Related Rants
Freaking RESTful API's.
Never worked with one before and I'm using Django Rest Framework.
Currently working (trying to) with Angular 2.
Spent lots of time trying to make angular work because ng needs arrays instead of objects when I finally realized it was a matter of the API.
Have no idea what I'm doing
undefined
api