https://github.com/dabeng/angular-basics
https://github.com/dabeng/angular-basics
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dabeng/angular-basics
- Owner: dabeng
- License: mit
- Created: 2019-07-01T07:28:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-01T07:28:53.000Z (about 7 years ago)
- Last Synced: 2025-01-28T02:22:45.680Z (over 1 year ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-basics
## Component Communication
**best practice:** Whenever you don't have a direct parent → child relationship, use a (shared) service to share data and/or send events.
**bad practice:** You could use @Input() in parent component and data binding in the grandparent template to pass a value from grandparent to parent, and use the same mechanism -- @Input() in child and databinding in parent template -- to pass the parent's databound property to the child.