I'm developing a web application for a friend who needs an online portfolio. As a learning experience, I'm trying to do the front-end with AngularJS and using Wordpress as a backend with the official API plugin. It works really well, but there's a problem.
I can't seem to completely hide the Wordpress frontend. There might be something I'm missing, but I don't know how to set my website to exclusively use the Angular app for the frontend. Things I have tried:
- Modifying the
.htaccessfile to include
index.html(the starting file of my Angular app) and
index.phpsecondarily in order to keep being able to use the API calls from my app. This causes some problems: when I've navigated to, say,
mysite.com/page-one.htmland I reload the page, the WP site is loaded instead of my Angular app.
- Redirecting all pages (that are not within my app) to
These don't seem like robust solutions to me at all. I need to remove the Wordpress site and only use WP for the API. Am I missing something?
I have changed my focus on this question and have realized that I don't need to hide the WordPress front-end but rather actually use it. I'll answer the question, and maybe it'll inspire other, better answers by more knowledgeable people.