What is the difference between using Angular’s viewChildren
and jQuery?
Angular provides the ability to use viewChildren
to access and interact with an HTML element. This differs from jQuery in several ways.
Angular viewChildren
- Uses the browser’s native DOM APIs
- Is part of an Angular component
- Scopes the element to the component
jQuery
- Uses jQuery’s APIs
- Is not part of an Angular component
- Is not scoped to the component