-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Milestone
Description
In the example it suggests the fetch function should be a property of the route and that a direct reference to that function be passed to the component. This won't run the function in the scope of the route and therefore you can not access the store.
{{#impagination-dataset fetch=fetch}}export default Ember.Route.extend({
fetch: function(pageOffset, pageSize, stats) {
return this.store.query(...); // fail
})
});I was expecting that I would pass the name of the action that should be run as a string as is consistent with other components.
{{#impagination-dataset fetch="fetch"}}export default Ember.Route.extend({
actions: {
fetch(pageOffset, pageSize, stats) {
return this.store.query(...); // success
})
}
});As a temporary workaround I am doing this:
{{#impagination-dataset fetch=(action "fetch")}}