Issue
I'm trying to set the 5 in Array(5) to another variable in this code:
What I'm trying to do:
export class HelloComponent {
@Input() page: number;
active = 0;
pages;
constructor() {
this.pages = Array(this.page) //rather than Array(5)
.fill(0)
.map((x, i) => i);
this.pages.pop();
}
get currentPage() {
return this.active;
}
}
Here's the stackblitz
Solution
Honestly, I'm not sure of what you're trying to do here, but have a look at this fork of your StackBlitz demo.
Is this what you want to do?
Answered By - Vasileios Kagklis
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.