-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Basic Usage #168
Comments
Hi @ssaul - if you've got the infinity-loader component on the corresponding template (or any template deeper in the view tree for that matter) to your infinity-route, you won't need to implement any actions, everything will "just work". The only case where you need to explicitly write your own action handler is when your infinity-loader is within another component. In this case you either need to bubble it up, or use the I feel like most intermediate Ember people are aware of this - but I can see how it would be a stumbling block for beginners. I'll write something shortly for the readme - thankyou for picking up on this! |
I'm stuck with this issue now - I have moved the InfinityComponent down to a lower-level component than the index route and now it does not work again, only loads the first page again! I have installed the ember-route-action-helper from Dockyard already since I use that in some of my own components. But I am stumped as to how do I pass down or bubble up the InfinityLoad - where do I put what, basically? I'd be more than happy to update the docs with a guide if only I can figure this one out! |
I tried this in my index template, where my component is, but that didn't work.
|
Tried adding this to my component, which got rid of the console error about not having an action handler, but still I cannot figure out how to get the next page to load 👎
OMG it sucks being an Ember lightweight noob! "You know nothing John Snow!" comes to mind here. |
Before I go hurl myself off a bridge, I also tried this (for future reference to prevent anyone else trying this and failing also). In my route index.hbs:
in my route index.js
in my component employees-list.js:
Of course it doesn't loadMore, why would it, this is EmberFFrustration. The actions fires, it comes back to the 'mycontroller' and calls the action defined in the route, and nothing happens. To really frustrate me the UI shows "Loading infinity Model" (accompanied by an evil laugh...or maybe I am just imagining that bit). |
@rmcsharry I was not able to figure this one out either. I ended up taking ember-infinity out of my component and just implementing it in the route and respective template. Would have been nice to figure this out. |
@ssaul I spent a few more hours on this today, and still cannot get it to work. I have tried everything. I laugh because I have ended up doing the same as you (moving ember-infinity to the route's template). |
Added it to SO, since pretty sure lots of people would love to use this inside their own components. |
Thanks guys - I don't really recommend using this inside of a component (I can't currently think of a good reason for it) - but it works the same as regular-old-ember action bubbling. Please check #180 for my recommendation. |
The following statement from Basic Usage is a bit ambiguous
The only action that is spoken about is
infinityLoad
and it is at the end of the readme. You may want to consider mentioning that you have to implement the action (and mention the actions name) in the Basic Usage. It reads like the basic usage would have worked with out adding an action to the route.The text was updated successfully, but these errors were encountered: