Take It for a Ride
We need to create two HTML files, one that is referenced by the componentâs templateUrl attribute and the other, which will load up Angular and get things in motion.
Letâs edit the public/tasks.component.html file first.
â | <body> |
â | <div class=â"heading"â>TO-DO</div> |
â | |
â | <div id=â"taskslist"â> |
â | <p>Number of tasks: <span id=â"length"â>{{ tasks.length }}</span> |
â | <span id=â"message"â>{{ message }}</span> |
â | <table> |
â | <tr â*ângFor =â"let task of tasks"â> |
â | <td>{{ task.name }}</td> |
â | <td>{{ task.month }}/{{ task.day }}/{{ task.year }}</td> |
â | </table> |
â | </div> |
â | </body> |
The file displays the number of tasks using the expression that binds to the componentâs tasks ...
Get Test-Driving JavaScript Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.