Base for each DORF field.
@Component() annotation should be set on the subclass level and then no more annotations should be presented
(e.g. no @Input() or @Output() on properties).
If there is no way to go without additional annotations in subclass, metadata should be listed directly
in the subclass once again, with the corresponding @Input annotation.
Base for each DORF field.
@Component()annotation should be set on the subclass level and then no more annotations should be presented (e.g. no@Input()or@Output()on properties). If there is no way to go without additional annotations in subclass,metadatashould be listed directly in the subclass once again, with the corresponding@Inputannotation.// @Component({ moduleId: module.id, selector: "star", styleUrls: ["star-rating.component.css"], templateUrl: "star-rating.component.html" }) export class StarRatingComponent<T> extends AbstractDorfFieldComponent<T, StarRatingMetadata<T>> implements IStarRatingDefinition<T> { constructor(config: DorfConfigService) { super(config); } setValue(val: number) { this.formControl.setValue(val + 1); } get max() { return this.metadata.max; } get stars() { return new Array(this.max); } get value() { return this.formControl.value; } }