Web
Analytics
@Input and @Output in angular 2 with example | real time demonstration

For Consultation : +91 9887575540

Stay Connected :

@Input and @Output in Angular with the example

@Input Example

@Input and @output are used to make communication between components in angular, @input is used whenever we want to transfer data from parent component to child component and @ output is used when we want some data from child component to Parent component.

  1. First We create and child component “inputex” and write following code into ts and html file .




Step 2: Parent Component (app.component)

Output: 





@Output Example

Child Component 




Parent Component

Output






Select your currency