javascript - How to dynamically create Firebase select query? -


i need information firebase database through filters applied checkbox.

i have courses , user has options. can choose more 1 option don't know how required information when chooses options , presses okay. don't want retrieve courses data; data selected options.

i explain in more detail in photo:

enter image description here

that's code firebase. i'm looking query dynamically in ionic 2 app

 public getcourseslist(){ // write here?? , want assignment objects in this.coursesa  return new promise(resolve => {   let coursea = [];   this.coursesdata.getcourseslist(this.department.id).map( eachsnapshot => {     eachsnapshot.on('child_added',function(coursesnapshot){       coursesnapshot.foreach(function(snap):boolean{           let coursedetails = {           class:snap.val().class,           coursename: snap.val().coursename,           start:snap.val().start,           end:snap.val().end,           lecture: snap.val().lecture,         };         console.log("ad"+coursedetails);         this.coursesa.push(coursedetails);         return false;       });      });   }); 


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -