Fix missing event argument in Banking App Part 1

This commit is contained in:
Ari Clark
2021-05-26 18:17:05 -06:00
committed by Yohan Lasorsa
parent 4f25bb5eb0
commit 1c854f059f
6 changed files with 12 additions and 12 deletions

View File

@@ -247,9 +247,9 @@ function onLinkClick(event) {
Let's complete the navigation system by adding bindings to our *Login* and *Logout* links in the HTML.
```html
<a href="/dashboard" onclick="onLinkClick()">Login</a>
<a href="/dashboard" onclick="onLinkClick(event)">Login</a>
...
<a href="/login" onclick="onLinkClick()">Logout</a>
<a href="/login" onclick="onLinkClick(event)">Logout</a>
```
Using the [`onclick`](https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers/onclick) attribute bind the `click` event to JavaScript code, here the call to the `navigate()` function.