Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation to include adapterOptions example #25

Open
rmharrison opened this issue Oct 27, 2016 · 0 comments
Open

Update documentation to include adapterOptions example #25

rmharrison opened this issue Oct 27, 2016 · 0 comments

Comments

@rmharrison
Copy link
Contributor

rmharrison commented Oct 27, 2016

The addon uses urlSegments for dynamic portions of nested routes. How to pass information from the model to the functions of urlSegments is non-obvious.

As of 72c1aad, the README uses sessions.
Catch: Managing state in a singleton; bad bad. That's what the router is for.

A stackoverflow post mentions the use of query.
Catch: Query is null for most common urlFor* methods such as urlForFindAll() <-- this.store.findAll(). Must use this.store.query() or this.store.queryRecord()

I prefer snapshot.adapterOptions, as snapshot is available for all urlFor* methods.

Details...
slides, video

rmharrison added a commit to rmharrison/ember-data-url-templates that referenced this issue Oct 27, 2016
There is no silver bullet when it comes to passing application data to `urlSegment`
The README should reflect this fact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant