Umid2017-11-07 19:32:52
Umid, 2017-11-07 19:32:52

Angular + Wordpress (like backend), where to dig?

Good evening.
There was a need to make a project in conjunction with Angular + Wordpress, and immediately a few questions arose:
1) How to organize the connection between these two components?
- At the moment, I found only this , but there may be more resources that I do not know about.
2) How will the project work in a production environment?
Will the resulting html file (the same one that angular-cli spits out when ng build command) be renamed to .php and then uploaded to wordpress as a theme, or maybe there are other options?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
artem-galas, 2017-11-07

1) You separate your application into API and client - communicate using JSON, everything is very simple
2) No, of course it will be index.html, the usual single-page-app.
If you want to embed Angular in WordPress, then it is better to use version 1 for this.

Vladimir, 2017-11-07

It doesn't really matter if you use version 1 or 2, but for reasons of novelty and performance, version 2 is preferable.
Angular takes data from any REST server, that is, you need to dig in the direction of

The WordPress REST API makes it easier than ever to use WordPress in new and exciting ways, such as creating Single Page Applications on top of WordPress.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question