how to search in signal list in angular

Discussão em 'Angular' iniciado por davood beheshti, Abril 11, 2025.

  1. I have a list of signal type.

    searchModelDriver: string = '';

    driverList = signal<any[]>([
    { fullName: 'test1' },
    { fullName: 'test2' },
    { fullName: 'test3' },
    ])


    I also have a simple input in the html that I want to search in.

    <div>
    <input type="text" pInputText placeholder="Search Driver ..." [(ngModel)]="searchModelDriver" />
    </div>
    <div *ngFor="let item of driverList(); let i = index;">
    {{item.fullName}}
    </div>


    Now my problem is that no matter what I do, I can't get into this signal and perform the search operation

    Please help me

    Continue reading...

Compartilhe esta Página