Skip to content

Instantly share code, notes, and snippets.

@AhsanNissar
Created January 10, 2019 12:23
Show Gist options
  • Save AhsanNissar/6fe2cf654a8c1e5fb7924202f62fec12 to your computer and use it in GitHub Desktop.
Save AhsanNissar/6fe2cf654a8c1e5fb7924202f62fec12 to your computer and use it in GitHub Desktop.
@Component({
selector: 'app-student-list',
templateUrl: './student-list.component.html',
styleUrls: ['./student-list.component.css'],
animations: [appModuleAnimation()]
})
export class StudentListComponent extends PagedListingComponentBase<StudentListDto> {
students: StudentListDto[] | undefined;
constructor(
injector: Injector,
private router: Router,
private _studentService: StudentServiceProxy,
private _sharedDataService: SharedDataService
) {
super(injector);
}
list(request: PagedRequestDto, pageNumber: number, finishedCallback: Function): void {
this.showSpinner = true;
this._studentService.GetSchoolStudents(this.appSession.tenant.tenancyName)
.finally(() => {
finishedCallback();
this.showSpinner = false;
})
.subscribe((result: ListResultDtoOfStudentDto) => {
this.students = result.studentList;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment