Created
September 18, 2020 04:26
-
-
Save jcamilom/47cc457a648d74bb52a855fb70c8144d to your computer and use it in GitHub Desktop.
This file contains 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: 'user-check-option', | |
template: ` | |
<label> | |
<input type="checkbox" [formControl]="control"> | |
<div class="card"> | |
<div class="avatar"> | |
<img src="assets/images/{{ value.avatar }}"> | |
<div class="span"></div> | |
</div> | |
<h1>{{ value.name }}</h1> | |
<h2>{{ value.location }}</h2> | |
</div> | |
</label> | |
` | |
}) | |
export class UserCheckOptionComponent { | |
@Input() value: any; | |
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