Last active
August 6, 2017 03:20
-
-
Save karthikchintala1/37dc06e21b1ee1b55d67fdf96d96379d to your computer and use it in GitHub Desktop.
accessing the inputs passed from another component in angular
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
import { Component, Input } from '@angular/core'; | |
@Component({ | |
selector: 'child-comp', | |
template: ` | |
<div> | |
{{ parentCount }} | |
</div> | |
` | |
}) | |
export class ChildComponent { | |
@Input() | |
parentCount: number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment