Angular orderBy pipe

Discussão em 'Angular' iniciado por user13473845, Dezembro 27, 2024.

  1. user13473845

    user13473845 Guest

    I want to order my result by a property name but the following gives me an error:

    *ngFor="let s of rslt| order by:wind_park">


    what i get from back-end:

    data = [
    { turbine_name: "Baynne ", wind_park: "Bayone" },
    { turbine_name: "Salstiegl ", wind_park: "Salzst" },
    { turbine_name: "Chradurga - SLL2", wind_park: "Chiarga" },
    { turbine_name: "Moilishte ", wind_park: "Mogihte" },
    { turbine_name: "Mogshte ", wind_park: "Mogshte" }
    ]


    How can I order it and what's the best practice? Thank you all in advance.

    Continue reading...

Compartilhe esta Página