Created
September 18, 2020 04:32
-
-
Save jcamilom/fd239d5277d08a416cc2c809a4691dee 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
export abstract class MultiCheckOption { | |
abstract value: any; | |
public control = new FormControl(false); | |
get valueChanges$(): Observable<boolean> { | |
return this.control.valueChanges; | |
} | |
} | |
@Component(...) | |
export class SimpleCheckOptionComponent extends MultiCheckOption { | |
@Input() value: any; | |
@Input() label: string; | |
} | |
@Component(...) | |
export class UserCheckOptionComponent extends MultiCheckOption { | |
@Input() value: any; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment