Created
September 18, 2020 04:16
-
-
Save jcamilom/0bc13bfed3bc79254a31b3227d94777a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'simple-check-option', | |
template: ` | |
<label> | |
<input type="checkbox" [formControl]="control"> | |
{{ label }} | |
</label> | |
` | |
}) | |
export class SimpleCheckOptionComponent { | |
@Input() value: any; | |
@Input() label: string; | |
public control = new FormControl(false); | |
get valueChanges$(): Observable<boolean> { | |
return this.control.valueChanges; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment