This worked, thanks Lucas
On Tue, Apr 2, 2019 at 9:35 PM 'Lucas Lacroix' via Angular and AngularJS
discussion wrote:
> It's just a guess, but I think it's because the "data" array within
> collections does not have a type. Try this:
> collections = {count: 60, data: [] as any[]}
>
> Also...
It's just a guess, but I think it's because the "data" array within
collections does not have a type. Try this:
collections = {count: 60, data: [] as any[]}
Also... Stop using "var" and use "let" instead. Variables defined by "var"
are hoisted and this can have negative effects on your code.
On
Hello
I have attached code in VS code which helps to generate dummy data. the
basic purpose of having pagination in anguar 6 project.
this.collection.data.push(
{
id: i + 1, // here it gives error Type 'number' is not assignable to type
'never'.ts(2322)
value: "items number " + (i + 1)
}
);
}