import Ember from 'ember';
import ProgressIndicator from 'klondike/progress-indicator';

export default Ember.Mixin.create({
    actions: {
        loading: function() {
            ProgressIndicator.start();
            this.router.one('didTransition', function() {
                ProgressIndicator.done();
            });
        }
    }
});

import Ember from 'ember';
import ProgressIndicator from 'klondike/progress-indicator';

export default Ember.Mixin.create({
  start: ProgressIndicator.start,
  done: ProgressIndicator.done,

  actions: {
    loading: function() {
      this.start();
    },

    error: function() {
      this.done();
    },

    didTransition: function() {
      this.done();
    }
  }
});

Stop progress indicator when route errors.
Stop progress indicator when route errors.
