censis-obrand/dev-archive/censis/obrand/obrand-admin/app/routes/pages.js

30 lines
788 B
JavaScript
Raw Normal View History

2016-03-29 11:15:56 +00:00
import Ember from 'ember';
const { inject: { service }, RSVP } = Ember;
export default Ember.Route.extend({
sessionAccount: service('session-account'),
2016-04-01 15:45:00 +00:00
beforeModel() {
'use strict';
const cid = this.get('sessionAccount.account.memberof');
console.log(cid);
this.store.query('page', { filter: { cid: cid } }).then(function(d) {
// Do something with `peters`
// console.log(d);
return d;
});
},
2016-03-29 11:15:56 +00:00
model: function(params) {
2016-04-01 15:45:00 +00:00
return this.store.findAll('page');
/* 'use strict';
2016-03-30 15:45:00 +00:00
const cid = this.get('sessionAccount.account.memberof');
console.log(cid);
2016-04-01 15:45:00 +00:00
this.store.query('page', { filter: { cid: cid } }).then(function(d) {
// Do something with `peters`
console.log(d);
return d;
});*/
2016-03-29 11:15:56 +00:00
2016-04-01 15:45:00 +00:00
}
2016-03-29 11:15:56 +00:00
});