import BasicComponent from './basic-component'; import { computed } from '@ember/object'; import { alias } from '@ember/object/computed'; export default BasicComponent.extend({ 'col-width': 6, classNames: ['form-group'], classNameBindings: ['has-error:has-error'], errors: alias('route.controller.errors'), 'has-error': computed('errors', function() { return this.get('errors.' + this.get('name')); }), hasError: alias('has-error'), 'error-msg': true, 'label-class': 'col-xs-12 col-sm-3 col-md-3', 'input-class': 'col-xs-12 col-sm-5 col-md-5' });