Skip to content

Commit e9d596c

Browse files
committed
update readme
1 parent e62ea99 commit e9d596c

File tree

3 files changed

+6
-108
lines changed

3 files changed

+6
-108
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# Angular Template Hierarchy and Data fetching Example
22

3-
In this example we show how to implement the WP Template Hierarchy in Angular for use with a Headless WordPress backend using WPGraphQL.
3+
In this example we show how to implement the WordPress Template Hierarchy in Angular for use with a Headless WordPress backend using WPGraphQL.
44

55
## Getting Started
66

77
> [!IMPORTANT]
88
> Docker Desktop needs to be installed to run WordPress locally.
99
1010
1. Run `npm run example:setup` to install dependencies and configure the local WP server.
11-
2. Run `npm run example:start` to start the WP server and Angular development server and backend for fetching dynamically wp-templates.
11+
2. Run `npm run backend:start` starts the backend server for template fetching at http://localhost:3000/api/templates
12+
3. Run `npm run example:start` to start the WordPress server and Angular development server.
1213

1314
> [!NOTE]
1415
> When you kill the long running process this will not shutdown the local WP instance, only Angular. You must run `npm run example:stop` to kill the local WP server.
1516
1617
## Trouble Shooting
17-
18-
To reset the WP server and re-run setup you can run `npm run example:prune` and confirm "Yes" at any prompts.
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
20+
2. To reset the WP server and re-run setup you can run `npm run example:prune` and confirm "Yes" at any prompts.

examples/angular/template-hierarchy-data-fetching/example-app/README.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/angular/template-hierarchy-data-fetching/example-app/STRUCTURE.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)