Skip to content

Instantly share code, notes, and snippets.

@karthikchintala1
Last active August 6, 2017 03:20
Show Gist options
  • Save karthikchintala1/37dc06e21b1ee1b55d67fdf96d96379d to your computer and use it in GitHub Desktop.
Save karthikchintala1/37dc06e21b1ee1b55d67fdf96d96379d to your computer and use it in GitHub Desktop.
accessing the inputs passed from another component in angular
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