Last active
May 9, 2019 08:30
-
-
Save armanozak/8a70f3aae1098a9a767140b5891615ff to your computer and use it in GitHub Desktop.
Angular Context - Two-way Data-binding (#3) #blog
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: 'two-way', | |
template: ` | |
<ng-template | |
contextDisposer="rate onRating" | |
let-rate="rate" | |
let-onRating="onRating" | |
> | |
<rating | |
[ngModel]="rate" | |
(ngModelChange)="onRating($event)" | |
></rating> | |
</ng-template> | |
`, | |
}) | |
export class TwoWayComponent {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment