Solution: Handle Multiple Elements with Directives
Here’s the solution to the task on handling multiple elements with directives as well as the expected result and explanation.
We'll cover the following...
The solution relies on these four major points:
- Using
NgFor
to display inputs. - Providing a directive that gathers
value
from the single input. - Using
ViewChildren
to access all inputs and get their values. - Getting the values.