alexmngn / ember-route-history Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello,
Thanks for a great add-on. However, it seems it may have a short-coming in its implementation...
It seems that nested routes are added to the history stack, for example:
if a user visits /top-level/list-of-posts/post/123
as their first page in a session (i.e they have no history), then the history
stack will still contain list-of-posts
as the previous page (where posts
is the current page).
I was hoping I could use this add-on to dynamically show a 'Back' button (like iOS) only where the ember app has pages the browser history, but it seems that it's not possible (because all nested pages will always have a history, even if it's the first page visited in a session).
I'm happy to look into providing a PR if you can give any pointers on how to improve this?
I would like to use this add-on with several routes that include dynamic params, but it seems that this add-on only stores the name of the route without its params. Is there a way to get this information?
The initializer
store
has been deprecated. Please update yourinjectRouteHistory
initializer to use useafter: 'ember-data'
instead.
See https://www.emberjs.com/deprecations/ember-data/v2.x/#toc_id-ds-deprecated-initializers
Looks like a PR has already been submitted for this: #6
Currently I can't set an ID in the history, so I can't return to routes that require an ID. I'm thinking that each history item could be an object
{
routeName: "user",
id: 10
}
rather than just a routeName, then I could return to that route with the right ID and maintain state.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.