Angular Hide With Button

Discussão em 'Angular' iniciado por RaptorJesus, Abril 17, 2025.

  1. RaptorJesus

    RaptorJesus Guest

    So I'm working with Angular and I'm trying to make a button that when clicked disappears. I have tried to use [hidden], (click)="showHide = !showHide", and a bunch of other methods. Nothing is working so far.

    My html (currently):

    <div class="rows">
    <div class="a-bunch-of-styles-for-my-button">
    <a type="button" class="more-styles" (click)="inboundClick = !inboundClick" [routerLink]="['/inbound']" href="">
    </a>
    </div>
    </div>


    and my component:

    export class AppComponent {
    inboundClick = false;
    }


    In essence I have 2 buttons on a page and when one button is clicked I want to hide both buttons and display a set of new buttons.

    I'm very new to Angular and I'm very confused why this won't work.

    Continue reading...

Compartilhe esta Página