2282f3243a
deactivate happens _after_ the new route's model hook, which results in the possibility of canceling new requests right after they are made rather than existing open connections
15 lines
452 B
JavaScript
15 lines
452 B
JavaScript
import Route from '@ember/routing/route';
|
|
import { collect } from '@ember/object/computed';
|
|
import { watchAll } from 'nomad-ui/utils/properties/watch';
|
|
import WithWatchers from 'nomad-ui/mixins/with-watchers';
|
|
|
|
export default Route.extend(WithWatchers, {
|
|
setupController(controller) {
|
|
controller.set('watcher', this.get('watch').perform());
|
|
return this._super(...arguments);
|
|
},
|
|
|
|
watch: watchAll('node'),
|
|
watchers: collect('watch'),
|
|
});
|