Skip to content

Instantly share code, notes, and snippets.

@armanozak
Last active May 9, 2019 08:30
Show Gist options
  • Save armanozak/8a70f3aae1098a9a767140b5891615ff to your computer and use it in GitHub Desktop.
Save armanozak/8a70f3aae1098a9a767140b5891615ff to your computer and use it in GitHub Desktop.
Angular Context - Two-way Data-binding (#3) #blog
@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