0

I'm working with a hybrid Angular application consisting of AngularJS and Angular 7. I'm trying to set 2-way binding between an AngularJS component to an Angular downgraded component.

When I change the bound property in AngularJS, the change reflects in the Angular component. When I change the property in the Angular component, I see the change inside the Angular component, but not in the AngularJS component.

Here's a working example: https://stackblitz.com/edit/angular-ng-upgrade-downgrade-9fzfz6

  1. click on AngularJS anchor
  2. Enter something in the top Input (the AngularJS component)
  3. See that it reflects in the lower input (the Angular component)
  4. Type in the lower input
  5. See that it doesn't reflect in the top input
Tomer W
  • 35
  • 5
  • 1
    by using @input here in the angular component you will only be able bring in data to the angular component (will not pass the value back ) . The issue here is not with the use of two way binding but with angular component interaction with angularjs component. you will have to pass the updated value from angular component to angularjs component – Joel Joseph Apr 16 '19 at 12:02
  • you cannot pass data from child to parent component using @input , here the communication is only one way ( from parent to child [angularjs ---> angular ] ) This explains the changes not reflect in parent component when value in child is changed – Joel Joseph Apr 16 '19 at 12:14

0 Answers0