|
1 | 1 | # Views Middleware for Pinecone Router
|
2 | 2 |
|
3 |
| -[](https://github.com/pinecone-router/middleware-views/tree/3.0.0) |
4 |
| -[](https://bundlephobia.com/result?p=pinecone-router-middleware-views@3.0.0) |
| 3 | +[](https://github.com/pinecone-router/middleware-views/tree/3.0.1) |
| 4 | +[](https://bundlephobia.com/result?p=pinecone-router-middleware-views@3.0.1) |
5 | 5 | [](https://www.jsdelivr.com/package/npm/pinecone-router-middleware-views)
|
6 | 6 | [](https://npmjs.com/package/pinecone-router-middleware-views)
|
7 | 7 | [](/CHANGELOG.md)
|
@@ -38,9 +38,9 @@ npm install pinecone-router-middleware-views
|
38 | 38 | // load this middleware
|
39 | 39 | import 'pinecone-router-middleware-views'
|
40 | 40 | // load pinecone router
|
41 |
| -import PineconeRouter from 'pinecone-router'; |
| 41 | +import PineconeRouter from 'pinecone-router' |
42 | 42 | // then load alpine.js
|
43 |
| -import Alpine from 'alpinejs'; |
| 43 | +import Alpine from 'alpinejs' |
44 | 44 | // add the router as a plugin
|
45 | 45 | Alpine.plugin(PineconeRouter)
|
46 | 46 | // start alpine
|
@@ -127,11 +127,11 @@ In the example above:
|
127 | 127 |
|
128 | 128 | This middleware dispatch these events:
|
129 | 129 |
|
130 |
| -| name | recipient | when is it dispatched | |
131 |
| -| ------------------ | ------------------------------ | --------------------------- | |
132 |
| -| **pinecone-start** | window | when the page start loading | |
133 |
| -| **pinecone-end** | window | when the page loading ends | |
134 |
| -| **fetch-error** | #app or your specific selector | when the fetch fail | |
| 130 | +| name | recipient | when is it dispatched | |
| 131 | +| ------------------ | --------------------------------------- | --------------------------- | |
| 132 | +| **pinecone-start** | window | when the page start loading | |
| 133 | +| **pinecone-end** | window | when the page loading ends | |
| 134 | +| **fetch-error** | #app or whatever is default in settings | when the fetch fail | |
135 | 135 |
|
136 | 136 | The first two events can be used to show a loading bar or indicator
|
137 | 137 |
|
|
0 commit comments