Update README.md

Ari's changes - Event argument added
pull/313/head
Jen Looper 4 years ago committed by GitHub
parent dbde9cb1a3
commit 5aed76219d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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/en-US/docs/Web/API/GlobalEventHandlers/onclick) attribute bind the `click` event to JavaScript code, here the call to the `navigate()` function.

Loading…
Cancel
Save