python - Django + Angular2: How to fetch data from database? -


i using angular2 front end in html pages.i have django project uses postgresql. best approach use angular2 in django project connect django models , database perform basic operations(crud)like read,update etc?

currently need fetch data database dynamically. (e.g.if user clicks on product product list product details should retrieved database , shown user)

any advice or reference example link helpful.

create rest api end points using django (use drf standard rest api's or use vanilla django generate json response requests , call rest api).

for ex: /product/:id api end point you've created fetch details of particular product in django

then use angular request throught api's , responses , whatever want data.

for ex: make request /product/1 fetch details of product pk = 1 when user clicks product.

browse through github inspiration.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -