-
-
Save chidumennamdi/6678fd7ebf4fd958b1f766585cad8520 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: 'my', | |
template: ` | |
{{count}} | |
` | |
}) | |
export class MyComponent { | |
@Input() | |
count:string | |
} | |
@Component({ | |
template: ` | |
<my [count]="parentCount"></my> | |
<button (click)="clickMe()">Click</button> | |
` | |
}) | |
export class AppComponent { | |
parentCount=0 | |
clickMe() { | |
this.parentCount++ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment