How can a parent component communicate with a child component without using @Input or @Output?
- Use BehaviorSubject and Renderer2
- Use Dependency Injection and ElementRef
- Use EventEmitter and ViewChildren
- Use ViewChild and ElementRef
A parent component can communicate with a child component without @Input or @Output by using ViewChild and ElementRef to access the child's properties and methods directly.
Loading...
Related Quiz
- When testing Angular pipes, it is crucial to test not only the transformation but also the _______ of the output.
- You need to create a custom directive that changes the background color of an element when the user hovers over it. What Angular concepts and decorators would you use to achieve this?
- A cold observable starts emitting values only when it has at least one subscriber.
- What is the main advantage of using Angular Universal for server-side rendering?
- How can you use a different class or value in place of a service in testing or certain scenarios?