Array concat on ngOnInIt() and does not reflect in template

16 views
Skip to first unread message

Dev C

unread,
Sep 26, 2019, 12:43:27 PM9/26/19
to ang...@googlegroups.com
  ngOnInit() {

I have array
console.log(this.array1) //this shows correct list

Second Array(this.array2) // this shows correct list

FinalArray =[];
FinalArray =this.array1.concat(this.array2)
//I also tried this one
This.finalArray = [...this.array,...this.array2]

   this.ref.detectChanges();
//this array is binded to HTMl template but this is not workin
template code here


 <li *ngFor="let c of completeList | search: searchText ; let i = index;">
</li>

 
  

What is missing here. ? it does not loaded into the template.

Sander Elias

unread,
Oct 3, 2019, 1:57:17 AM10/3/19
to Angular and AngularJS discussion
Hi Devc,

Can you make a sample in stackblitz? with given code it is impossible to help you.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages