Presented here is an object that I am working with:
this.people = [{
name: 'Douglas Pace',
title: 'Parcelivery Nailed The Efficiency',
content: 'Since I installed this app, its always help me book every tickets I need like flight, concert, ' +
'movie or hotel. I don\'t need to install different app for different ticket. The payment is also very easy',
image: '../../assets/img/profile_pics/profile_pic.jpg',
rate: '4.5',
classActive: 'testimonials__selected-visible',
active: true
},
{
name: 'Naseebullah Ahmadi',
title: 'Parcelivery Nailed The Efficiency',
content: 'Since I installed this app, its always help me book every tickets I need like flight, concert, ' +
'movie or hotel. I don\'t need to install different app for different ticket. The payment is also very easy',
image: '../../assets/img/profile_pics/profile_pic.jpg',
rate: '4.5',
classActive: '',
active: false
},
{
name: 'Haseebullah Ahmadi',
title: 'Parcelivery Nailed The Efficiency',
content: 'Since I installed this app, its always help me book every tickets I need like flight, concert, ' +
'movie or hotel. I don\'t need to install different app for different ticket. The payment is also very easy',
image: '../../assets/img/profile_pics/profile_pic.jpg',
rate: '4.5',
classActive: '',
active: false
}
];
When rendering this in html using a loop, it looks something like this:
<ng-template ngFor let-person="$implicit" let-variable [ngForOf]="people">
{{variable + 30}}
<ng-template/>
My query pertains to whether there exists a way to create a local variable and increment it by 30 for each element within the ngfor in template binding, without relying on separate methods for the incrementing process?
The reason behind my inquiry into avoiding incremental methods is due to encountering the following error message:
Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked