Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Last active September 10, 2019 11:41
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 Mayankgupta688/5385ef1d09e83214bdfbb8ae7802b674 to your computer and use it in GitHub Desktop.
Save Mayankgupta688/5385ef1d09e83214bdfbb8ae7802b674 to your computer and use it in GitHub Desktop.
@Component({
selector: 'child-component',
template: `
<div>
<input type="text" [(ngModel)]="userName" />
</div>
`
})
export class ChildComponent implements OnInit {
public userName: string;
updateUserName(): void {
this.userName = "Mayank"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment