Introduction

The function of @Input() and @Output() enables communication between parent and child components.

Using a Shared Service (RxJS)

Using a Shared Service with Subject (For Events)

Using Local Storage (Persist Data Across Components & Reloads)

Using Angular Router (queryParams or state)

Using ViewChild() (Access Child Component from Parent)

Using ViewChildren() (Access Multiple Child Components)

Using ContentChild() (Project Content into a Component)

Using ngModel (Two-Way Data Binding)

Using a Global Variable (Not Recommended)

Conclusion

Contact Us

0

Comment

407

Share

facebook
LinkedIn
Twitter
Mail
Angular