ahmed elbarbary

ahmed elbarbary

  • 636
  • 1.6k
  • 282.1k

How to replace comma separate by and when push data ?

May 17 2020 1:49 AM
I work on angular 7 i need to replace comma separated , when push data 
initcollectdropdowslist=[];
collectfulldata:string;
 
  1. let textdata=$event.target.options[$event.target.options.selectedIndex].text;  
  2.    let statusdata:any = this.FilterBinddata.filter(s=>s.reportSource==textdata)[0].reportSource2;  
  3.    
  4.  this.collectfulldata= statusdata + "=" + "'" + textdata + "'";  
  5.   
  6.    this.initcollectdropdowslist.push(this.collectfulldata);  
  7.    console.log("full data is " + this.initcollectdropdowslist)  
current result
  1. full data is Text6='Lifecycle',Text6='Package',Text6='Parametric'  
Expected result 
 
  1. full data is Text6='Lifecycle'and Text6='Package' and Text6='Parametric'   
 

Answers (5)