How can I show a div when menu item is clicked in angular?

The Div show fine when I click list item, but dsn't disappear when I navigate to other menu items.

  • Slots TOP NEW TS file: showme : boolean = false;
  • rproffitt commented: Please format your code in a code block so it can show in the forum. +15


    Using hidden property
    Add HTML native hidden property to the element that needs to be toggled. When the value of hidden property is true, the element is not displayed.
    Similarly, when it is false, the element is shown.
    Bind the hidden property to a component property of boolean type so that it can only have a true or false value.

    Be a part of the DaniWeb community

    We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.