[Solved] Repeated elements with dynamic datas code optimize in angular7

I got a solution for that <ul> <li *ngFor=”let link of links”> <ng-container *ngTemplateOutlet=”simpleLink; context:{link:link}”> </ng-container> </li> </ul> <ng-template #simpleLink let-link=’link’> Simple : {{ link.name }} <ul> <li *ngFor=”let link of link.childLinks”> <ng-container *ngTemplateOutlet=”simpleLink; context:{link:link}”> </ng-container> </li> </ul> </ng-template> solved Repeated elements with dynamic datas code optimize in angular7

[Solved] How to filter an array with multiple parameters

You don’t have pageTypeId property in the object. Because of that, i changed this property to id in the statement, and if you want filter value 1 or 2, i used || characters. Maybe you will edit your code like this, it will work. let tmpArray = [{“id”:”1″},{“id”:”2″},{“id”:”2″},{“id”:”3″},{“id”:”3″}]; this.nodes = tmpArray.filter(x => { return x.id.toString() … Read more