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: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ class Home extends Highway.renderer {
108
108
// Don`t forget to export your renderer
109
109
exportdefaultHome;
110
110
```
111
-
Besides the required methods from **Highway** present in the `Highway.renderer` you have access to **optional** ones that are called all along the process of the navigation. Here is the list of these **optional** methods:
111
+
Besides the required methods from **Highway** present in the `Highway.Renderer` you have access to **optional** ones that are called all along the process of the navigation. Here is the list of these **optional** methods:
112
112
113
113
-`onEnter`: Called when the transition `in` starts & the `router-view` is added to `router-wrapper`.
114
114
-`onLeave`: Called when the transition `out` starts.
@@ -159,7 +159,7 @@ Transitions in **Highway** are really simple, these are objects with two methods
159
159
-`in`: The `in` method should contain the transition to show a `[router-view]`.
160
160
-`out`: The `out` method should contain the transition to hide a `[router-view]`.
161
161
162
-
Each one get two parameters you can call how you want but here are good defaults:
162
+
Each one get two parameters you can call howewer you want but here are good defaults:
163
163
164
164
-`view`: The `[router-view]` you will show/hide.
165
165
-`done`: The callback method **you have to** call once the `in` and `out` transitions are over.
@@ -200,7 +200,7 @@ const H = new Highway.Core({
200
200
});
201
201
```
202
202
203
-
Finally you might want to use the same transition for all the pages across your website. This is possible by adding a `default` key to your transitions list. When you do so for each page **Highway** will look for a transition in the list related to your `router-view` name and fallback to the `default` one if none is found.
203
+
Finally you might want to use the same transition for all the pages across your website. This is possible by adding a `default` key to your transitions list. When you do so, for each page,**Highway** will look for a transition in the list related to your `router-view` name and fallback to the `default` one if none is found.
204
204
205
205
```javascript
206
206
// [...]
@@ -222,7 +222,7 @@ Last but not least, **Highway** extends [**tiny-emitter**](https://github.com/sc
222
222
223
223
-`NAVIGATE_START`: Trigger when a navigation starts.
224
224
-`NAVIGATE_END`: Trigger when a navigation ends.
225
-
-`NAVIGATE_ERROR`: Trigger when a error occurs in navigation process.
225
+
-`NAVIGATE_ERROR`: Trigger when an error occurs in navigation process.
226
226
227
227
For the `NAVIGATE_START` and `NAVIGATE_END` events, some parameters are sent with the event in this order:
0 commit comments