author | ymh <ymh.work@gmail.com> |
Wed, 20 Jan 2016 09:56:36 +0100 | |
changeset 110 | 8e5fcebb9018 |
parent 28 | b0b56e0f8c7f |
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 |
}); |