Week 6 — 9 / 15

Path, Routing, and History

spa only loads once, then switches between animals instantly with javascript. But what if we want to be able to link to /cat? What if we want /bear in our browser history?

By moving to a single-page setup, we have gained speed but lost some built-in browser behaviors. Now, we need to use javascript APIs to fill back in what we lost.

Modify the example app in spa/ so that the animal we pick as best goes into our browser history. Make sure that if we load the page with that URL, the correct animal is identified as best.