You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/angular/template-hierarchy-data-fetching/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,5 +16,8 @@ In this example we show how to implement the WordPress Template Hierarchy in Ang
16
16
17
17
## Trouble Shooting
18
18
1. I get "Page Not Found. Sorry, the page you are looking for does not exist. Please check the URL." when opening the Angular app and trying to navigate through it.
19
-
- Run `npm run backend:start` and verify that http://localhost:3000/api/templates returns correct data
19
+
- Run `npm run backend:start` and verify that http://localhost:3000/api/templates returns correct data.
20
+
- Verify if you have added `/backend/.env` file with correct `FRONTEND_URL`.
21
+
- check for any errors in the console
22
+
1. In some cases, you might have to install @angluar/cli globally. In /example-app/ run `npm install -g @angular/cli@latest`
20
23
2. To reset the WP server and re-run setup you can run `npm run example:prune` and confirm "Yes" at any prompts.
Copy file name to clipboardExpand all lines: examples/angular/template-hierarchy-data-fetching/backend/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,4 +4,5 @@ Used purely to fetch dynamically the available templates in `/example-app/src/ap
4
4
5
5
## Getting Started
6
6
7
-
1. Run `npm run dev` to start backend service for fetching templates at `http://localhost:3000/api/templates`. It fetches the templates located in `/example-app/src/app/components/wp-templates`.
7
+
1. Add `.env` file with `FRONTEND_URL=http://localhost:4200` or the desired URL for your Angular front application.
8
+
2. Run `npm run dev` to start backend service for fetching templates at `http://localhost:3000/api/templates`. It fetches the templates located in `/example-app/src/app/components/wp-templates`.
0 commit comments