mirror of
https://github.com/flarum/framework.git
synced 2025-02-25 15:59:23 +08:00
13 lines
356 B
JavaScript
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();
|
||
|
}
|
||
|
});
|