tim7692
tim7692

Reputation: 1

Wordpress plugin for Angular application

I have been hired in my first web developer job a few weeks ago for a moving software company of only 3 developers. The software connects to the moving companies' websites by installing quote forms (injected from the Angular application). Installation of the forms are easy for static HTML websites. However, it gets a little more complicated if a moving company has a Wordpress website, which is the majority of our clients. The process I have been shown is as follows:

  1. Add a copy of the Angular application directory to the root of the Wordpress website theme directory.
  2. In the theme's header.php file, we add the CSS links in the head of the file.
  3. Then, in the body tag, we add the Angular attributes that connects the app to the page (ie "ng-app")
  4. We then go to the footer.php file and add the script tags we need to add.

My question is, is there anyway that I can add create a Wordpress plugin that achieves these steps? Or, is there an easier way to go about connecting an Angular application to any website, not just Wordpress (it is a similar process for static HTML websites). I have been a part-time web developer for the past 3 years and am familiar with Angular and Wordpress, but not enough to know if this is possible. And the other developers (outsourcing from Russia) believe that their process is perfect and does not need any improvement, so they are not helpful.

Upvotes: 0

Views: 3531

Answers (1)

WarriorRocker
WarriorRocker

Reputation: 166

I have just released a plugin, Xo for Angular, which aims to provide a foundation for WordPress and Angular. Should meet all of your needs above.

https://wordpress.org/plugins/xo-for-angular/

It is currently in beta and would appreciate any feedback!

Main concepts:

  • Your Angular project exists as a theme within WordPress.
  • Angular templates (modules) which can be selected for pages and posts.
  • Dynamic routing of pages, posts, and other content created in WordPress.

Documentation (work in progress): https://angularxo.io/

Plugin github: https://github.com/WarriorRocker/angular-xo-core

Example theme: https://github.com/WarriorRocker/angular-xo-material

Let me know what you think, thanks!

Upvotes: 1

Related Questions