author | ymh <ymh.work@gmail.com> |
Fri, 15 Jan 2016 15:35:00 +0100 | |
changeset 28 | b0b56e0f8c7f |
parent 4 | f55970e41793 |
permissions | -rw-r--r-- |
4 | 1 |
import Ember from 'ember'; |
2 |
||
3 |
export default Ember.Route.extend({ |
|
28 | 4 |
options: Ember.inject.service(), |
5 |
beforeModel: function(/*transition*/) { |
|
6 |
var options = this.get('options'); |
|
7 |
if(options.docid) { |
|
8 |
return this.transitionTo('doc', {doc_id: options.docid}); |
|
9 |
} |
|
10 |
}, |
|
4 | 11 |
model: function() { |
12 |
return this.store.findAll('document'); |
|
13 |
} |
|
14 |
||
15 |
}); |