Challenge: Toggle Visibility Functionality

Complete the challenge of implementing the toggle visibility functionality in a component.

We'll cover the following

In the initial code setup provided below, a simple Angular application with one component (toggle-visibility) has been created. You are required to implement the following tasks:

  1. Add the component into the main module file, app.module.ts.

  2. Implement the toggle visibility functionality.

  3. Render the toggle-visibility component in the main application.

Expected output

  1. When the application is run, you should see a simple “Toggle Visibility” button, like this:

Get hands-on with 1400+ tech skills courses.