Computed property in model hook


Hi, guys…

Suppose we have such a route, where

    data: [],
    model: {
        return {
            filterData: Ember.computed.filter("data.[]", function(
                // just example
                return true;
    actions: {
        loadMoreData: function() {
            Ember.$.ajax.get("/api/data").then(function(response) {

So, of course, that doesn’t work cause there is no field “data” in object, returning from model hook.
But I was sure that proper pattern is to make all server requests from route. And that way, I can’t understand how I can provide it available in a template scope.

Any ideas? How do you organize code for routes with pagination and sorting on the page?


My Sorting and Pagination example is perhaps interesting: