blob: d22d6b2ecff894c7c4d1c2bbb3492b9538b4c990 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class RdpDataTableService {
constructor(private http: HttpClient) { }
add(applicationService: any, data: any): void {
applicationService.add(data);
}
update(applicationService: any, data: any): void {
applicationService.update(data);
}
delete(applicationService: any, data: any): void {
applicationService.delete(data)
}
get(applicationService: any, data: any) {
applicationService.get(data)
}
getTableDataList(pageIndex, pageSize, serviceUrl) : Observable<any> {
return this.http.get<any[]>(serviceUrl,{
params: new HttpParams()
.set('pageIndex', pageIndex.toString())
.set('pageSize', pageSize.toString())
});
}
}
|