Skip to content

Commit

Permalink
[docs] link section on navigating manually
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin authored Feb 16, 2019
1 parent b115f31 commit 0abde97
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/components/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ We also provide a link primitive with a different syntax:
| titleColor | Color of the text displayed on the link. | white |
| visualAspectEnabled | Whether to enable the default visual appearance of a portal. Set to false if we want to implement our own pattern or form of link traversal. | true |

## Methods
## Manually Navigating

### .navigate (url)
[so]: https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage

Sends the user to the page specified by the `href` property:
To navigate manually, use `window.location` API. See this [StackOverflow question on navigating][so]. For example:

```js
document.querySelector('a-link').navigate('destination.html');
window.location.href = 'https://supermedium.com/supercraft/';
// or window.location.replace
```

0 comments on commit 0abde97

Please sign in to comment.