blob: 3e8c3b5813771bf22ac371439a7b4916265dea6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/**
* Created by rc2122 on 9/4/2017.
*/
import { Component, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
import { RadioButtonModel } from 'app/models'
import {UiElementBaseInterface, UiElementBase} from "../ui-element-base.component";
@Component({
selector: 'radio-buttons',
templateUrl: './radio-buttons.component.html',
styleUrls: ['./radio-button.component.less']
})
export class RadioButtonComponent extends UiElementBase implements UiElementBaseInterface {
@Input() options:Array<RadioButtonModel>;
@Input() readonly:boolean;
@Input() direction:string = 'vertical'; //get 'horizontal' | 'vertical'
value:any;
select(value:any) {
this.value = value;
this.onChange();
}
}
|