Skip to content

Instantly share code, notes, and snippets.

@jcamilom
Created September 18, 2020 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcamilom/fd239d5277d08a416cc2c809a4691dee to your computer and use it in GitHub Desktop.
Save jcamilom/fd239d5277d08a416cc2c809a4691dee to your computer and use it in GitHub Desktop.
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