framework/ember/app/views/discussions/index.js
2014-12-20 16:56:46 +10:30

13 lines
356 B
JavaScript

import Ember from 'ember';
export default Ember.View.extend({
_updateTitle: function() {
var q = this.get('controller.searchQuery');
this.get('controller.controllers.application').set('pageTitle', q ? '"'+q+'"' : '');
}.observes('controller.searchQuery'),
didInsertElement: function() {
this._updateTitle();
}
});