I've recently set up a const
variable within
this.api.getApi().subscribe(({tool,beuty})
. Now, I'm trying to figure out how to run it within an if
statement, just like this:
if (evt.index === 0) {aa}
I plan on adding more similar lines and I need to execute them with different if
statements.
this.beu=beuty.slice(0,this.i+=15);
Any suggestions on a better approach to achieve this?
Here is the code snippet:
onScrollDown(evt:any ) {
setTimeout(()=>{
this.api.getApi().subscribe(({tool,beuty}) => {
const aa=this.beu=beuty.slice(0,this.i+=15);
})
if (evt.index === 0) {aa}
},1000);
}