aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/routes/packages.js
blob: 34a454d7a4dfb368500076f399fa8d8b2b71038f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import Ember from 'ember';
import {urls} from '../utils/api-urls';
import config from '../config/environment';

export default Ember.Route.extend({
  model () {
    return Ember.$.getJSON(urls.packagesUrl);
  },
  setupController(controller, model) {
    this._super(controller, model);
    controller.set('packages',model);
    controller.set('createSearchUrlFunction',(query) => {
      return urls.globalIdentifiersUrl(query);
    });
  },
  afterModel () {
    document.title = config.APP.title;
  }
});