Rendering The Reports

Looking at the report.html template, we are using accordion structure for report template configuration and tab structure for each individual report. The configuration tab has the active class by default. So when we open the report page, we see that the tab has been opened already.

Now what we need is a mechanism to generate tabs for each report template dynamically. That means we need to sense any update to Firebase and the moment an object is created/updated/deleted reflect that change on screen instantly. Since we already have an 'items' property associated with our Firebase object, implementing the first part is easy. Simply remove all hard-coded values from report.html and modify it as follows:

# src/app/report/report.html ...

Get Angular Services 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.