Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.44 KB

brisket.applicationlinks.md

File metadata and controls

31 lines (21 loc) · 1.44 KB

Application Links

In a Brisket app, an application link is an anchor tag link that links to another route in your app. Brisket treats anchor tags with relative path links as application links.

Anchor tags with relative paths look like this:

<a href="books">Link to 'Books' listing route</a>
<a href="books/turtles">Link to 'Turtles Book' route</a>
<a href="">Link to 'Home' route</a>

Clicking any of these fires a new route in your app. Note: while you are on a route, Brisket will ignore clicks to the same route. For example, while we're on the "books" route, if we click on a link to "books", Brisket will act as if nothing happened.

A nice feature of application links is they "work" even if JavaScript is disabled. When JavaScript is disabled or has not loaded yet, clicking application links triggers a full page load with the correct route - users can always access content!

Brisket allows all other types of links to behave as they would on a standard website:

<a href="http://www.bloomberg.com">Fully qualified link</a>
<a href="//www.bloomberg.com">Protocol agnostic link</a>
<a href="#middle">Hash tag link</a>
<a href="mailto:email@example.com">Mailto link</a>
<a href="javascript:{}">Javascript Code Link</a>
<a href="/books">Absolute links</a>

Note: While absolute links (e.g. "/books") go to another route in your app, they trigger a full page load rather causing a pushState change.