3

Application structure StackBlitz

This is what I have understood -

  1. On clicking the swap button (present in sub-component-a.ts), an event is trigged.
  2. This event is heard in app.component.ts which performs simple swapping operation on first two car objects.
  3. The component-a.ts view is updated (without its OnChanges()) being called).
  4. The sub-component-a.ts (which has @Input() position reference changed) is not updated.

How to swap two component-a, with their corresponding child components, sub-component-a also getting updated?

Nirmit Dalal
  • 315
  • 5
  • 12

0 Answers0