cms/app-client/app/routes/tabs/carto.js
author ymh <ymh.work@gmail.com>
Fri, 07 Oct 2016 02:07:34 +0200
changeset 324 92fc9d077f95
parent 309 6ab16926b675
child 331 9836845ed1e8
permissions -rw-r--r--
add pagination info for document list, move it to meta sub object

import Ember from 'ember';

export default Ember.Route.extend({

    modelQueryParam: '6295630',

    model: function() {
        return this.store.query('geostat', {
            'area': this.get('modelQueryParam'),
            'details': 1
        });
    },

    deactivate: function () {
        this.set('modelQueryParam', '6295630');
    },

    setupController: function(controller) {
        this._super(...arguments);
        controller.set('modelQueryParam', this.get('modelQueryParam'));
    },

    actions: {
        setModelQueryParam: function(id) {
            this.set('modelQueryParam', id);
            this.refresh();
        }
    }

});