query in angular2 and firebase

0

hi guys I'm trying to make a query on angular2 from firebase what happens is that I can only place a query request if I ask you to send me the data from the table with the user = when the session starts, but if I ask you to show me where status is equal to 1, throw me the Is syntax error any idea to fix this? Thank you

    
asked by Shirahama Alfaro 20.04.2017 в 08:43
source

1 answer

0

Seeing the specifications of the "query" within the import of the firebase, you can see that the "orderByValue" option only accepts a boolean:

  export interface Query {
   [key: string]: any;
   orderByKey?: boolean | Observable<boolean>;
   orderByPriority?: boolean | Observable<boolean>;
   orderByChild?: string | Observable<string>;
   orderByValue?: boolean | Observable<boolean>;
   equalTo?: any | Observable<any>;
   startAt?: any | Observable<any>;
   endAt?: any | Observable<any>;
   limitToFirst?: number | Observable<number>;
   limitToLast?: number | Observable<number>;
}

On the other hand, "queries" can only be ordered by a specific type of method. This means that you can only sort by OrderByKey, orderByPriority, orderByChild or orderByValue.

I hope I helped you. Greetings

    
answered by 20.04.2017 в 10:34