set trigger in Angular component in for loop

Discussão em 'Angular' iniciado por quma, Outubro 20, 2024.

  1. quma

    quma Guest

    I do have an Angular component in a for loop like this:

    <div *ngFor="let schedule of schedules">
    <my-app-component [schedule]="schedule"></my-app-component>
    </div>


    The MyAppComponent looks like this:

    @Component({
    selector: 'my-app-component',
    templateUrl: '...',
    styleUrls: ['...'],
    encapsulation: ViewEncapsulation.None
    })
    export class MyAppComponent implements OnInit {

    public disableButtonTrigger: boolean;


    In the MyAppComponent is a boolean trigger to disable buttons in this component. My problem now is if I set disableButtonTrigger = true than all buttons in all components in the for- loop are disabled. May aim would be that only the buttons on the specific component should be diasbled and not in all component. How can I achive this?

    Continue reading...

Compartilhe esta Página