-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.component.ts
35 lines (32 loc) · 1.15 KB
/
app.component.ts
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
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterOutlet } from '@angular/router';
import { DxDashboardControlModule } from 'devexpress-dashboard-angular';
import { DevExtremeModule } from 'devextreme-angular';
import { createStore } from 'devextreme-aspnet-data-nojquery';
import CustomStore from 'devextreme/data/custom_store';
import DataSource from 'devextreme/data/data_source';
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, RouterOutlet, DxDashboardControlModule, DevExtremeModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
serverUrl: string = "https://localhost:5001";
/* To debug the server, change 'serverUrl' to https://localhost:44396 and run the server application in Visual Studio. */
store: CustomStore;
dataSource: DataSource;
constructor() {
this.store = createStore({
key: "productID",
loadUrl: this.serverUrl + "/dashboardpanel/dashboards"
});
this.dataSource = new DataSource({
store: this.store,
paginate: true,
pageSize: 20
});
}
}