class SelectController {
  constructor(ModeFactory, SocketFactory) {
    'ngInject';

    this.modes = [];

    ModeFactory.getList().success( (result) => {
      this.modes = result;
    });

    console.log(SocketFactory);
  }
}

export default SelectController;

class SelectController {
  constructor(ModeFactory, SocketFactory) {
    'ngInject';

    this.modes = [];

    ModeFactory.getList().success( (result) => {
      this.modes = _.sortBy(result, (n) => n.mode_id);
    });

  }
}

export default SelectController;

Sort the modes by mode_id
Sort the modes by mode_id
