daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. onSelect(event){
  2.                 console.log('selected student',event);
  3.                 this.currentStudent = event.item;
  4.  
  5.            
  6.         }
  7.         onPrevious(curentStudentId){
  8.             console.log(curentStudentId)
  9.        
  10.             this.students.forEach((student,index) => {
  11.                 if(curentStudentId>0){
  12.                     this.previosStudent = this.students[curentStudentId-1];
  13.                     this.currentStudent = this.previosStudent;
  14.                 }
  15.             });
  16.         }
  17.         onNext(curentStudentId){
  18.             this.students.forEach((student,index) => {
  19.                 if(curentStudentId<this.students.length-1){
  20.                         this.nextStudent = this.students[curentStudentId+1];
  21.                         this.currentStudent = this.nextStudent;
  22.                 }
  23.             });
  24.        
  25.  
  26.         }
  27.  
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top