Code Monkey home page Code Monkey logo

django-angular's Introduction

ngdj

Django with Angular 6

This repo is a partial implementation of Django with Angular.

Before start, change:

  1. server/config/settings.py line 28 to ALLOWED_HOST = ['YOUR_IP']
  2. client/src/app/app.component.ts line 12 into url = 'YOUR_IP:DJANGO_HOST/product'
  3. client/src/app/app.component.ts line 18 to 23 into your custom ts function
  4. client/src/app/app.component.html line 10 to 17 into your custom html

To solve CORS problem, I recommend using --proxy-config config.js option in ng serve, but I also recommend this plugin in development level.

In 'YOUR_IP:ANGULAR_HOST', the button product/ will show 1) console.log(res._body) 2) alert(res._body) 3) html in the blank li.

To communicate with server and user, the client first get information(request) from user, then the client make another request to server. The server responses to client, then client reponses to user. It seems something inefficient and slow, but since we can divide data request in the client, we can reduce the total traffic of the client in large scale.

We have to improve:

  1. How to get an information efficiently from res in the server to html in the client?
  2. How to solve CORS problem efficiently?
  3. How to solve ip address problem efficiently? (I think buying a domain is a great solution)
  4. What to implement?# django-angular

django-angular's People

Contributors

abdul-rahman09 avatar muhammadafnan038 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.