Route is not retained after refresh
I'm on an internal project using [email protected]. When I'm looking at http://localhost:3141/docs/components/q-token-input (in Firefox) and then refresh the page it automatically takes me back to http://localhost:3141/docs/installation for some unknown reason. Visiting http://localhost:3141/docs/components/q-token-input directly has the same behavior, but navigating by using the sidebar works fine 🤔
Any ideas how to debug this?
/cc @samselikoff
Hmm... if it's deployed I wonder it has to do with the redirect logic we have? Given that it looks like you're developing locally I don't know how it could affect it but here's some relevant files:
- https://github.com/ember-learn/ember-cli-addon-docs/blob/b4bfe91ad58406808b960fc1870d571b16b462a4/vendor/ember-cli-addon-docs/github-spa.html
- https://github.com/ember-learn/ember-cli-addon-docs/blob/731830a208e6a36562a4639867439649720a032a/vendor/ember-cli-addon-docs/404.html
Other than that are you using the AddonDocsRouter import when setting up your docs routes? https://ember-learn.github.io/ember-cli-addon-docs/docs/quickstart
our router.js file:
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router'
import config from './config/environment'
const Router = AddonDocsRouter.extend({
location: config.locationType,
rootURL: config.rootURL
})
Router.map(function() {
docsRoute(this, function() {
this.route('installation')
this.route('components', function() {
this.route('q-address-input')
this.route('q-token-input')
})
})
this.route('not-found', { path: '/*path' })
})
export default Router
I'm not using any deployment right now, just running the dummy app via ember serve 🤔