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

php - How to display all orders for a single product showing the most recent first? Woocommerce -

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

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -