S
S
Spoon in the brain2019-03-23 13:39:32
Angular
Spoon in the brain, 2019-03-23 13:39:32

How to connect front-end and back-and (flask, angular)?

Recently got acquainted with the development of applications in python, studied, installed flask and so on.
After that, I needed to add SPA to my web application, which, unfortunately, drove me to a dead end.
I looked at github for examples of similar applications (only in the example that I studied the place of angular.js was vue.js), I noticed two folders there - back-end and front-end, after which I somehow understood and went to create something similar only using angular.js.
Now I’m sitting and I don’t understand anything, how to make forms, how to send requests to the back-end, and so on? Perhaps the question is elementary, so do not be angry at the beginner.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Koryakin, 2019-03-23
@zettend

Drip towards Rest API.

M
msdosx86, 2019-03-24
@msdosx86

You set up a python server on a specific port, for example 3000.
You run Angular via ng serve, it will set up an application for you on port 4200.
You make all requests to localhost:3000 and enjoy life.
And don't forget to configure cors on the server.

V
Vladimir, 2019-03-25
@Casufi

https://habr.com/ru/post/246699/
https://angular.io/tutorial

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question