Skip to content

Commit 531d288

Browse files
authored
CardView: FieldTemplate demo, Angular services fix (#30184)
1 parent 96953dc commit 531d288

File tree

6 files changed

+201
-212
lines changed

6 files changed

+201
-212
lines changed

apps/demos/Demos/CardView/FieldTemplate/Angular/app/app.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
DxProgressBarModule,
88
} from 'devextreme-angular';
99
import { Task, Service } from './app.service';
10-
import { EmployeeService } from './employee.service';
11-
import { PriorityService } from './priority.service';
1210
import { CardHeader } from './card-header/card-header.component';
1311
import { PriorityComponent } from './priority/priority.component';
1412
import { EmployeeComponent } from './employee/employee.component';
@@ -51,7 +49,7 @@ export class AppComponent {
5149
EmployeeComponent,
5250
ProgressComponent,
5351
],
54-
providers: [Service, EmployeeService, PriorityService],
52+
providers: [Service],
5553
bootstrap: [AppComponent],
5654
})
5755
export class AppModule { }

apps/demos/Demos/CardView/FieldTemplate/Angular/app/app.service.ts

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,9 +1346,205 @@ const tasks: Task[] = [{
13461346
Task_Parent_ID: 22,
13471347
}];
13481348

1349+
export interface Employee {
1350+
ID: number;
1351+
Name: string;
1352+
}
1353+
1354+
const employees: Employee[] = [{
1355+
ID: 1,
1356+
Name: 'John Heart',
1357+
}, {
1358+
ID: 2,
1359+
Name: 'Samantha Bright',
1360+
}, {
1361+
ID: 3,
1362+
Name: 'Arthur Miller',
1363+
}, {
1364+
ID: 4,
1365+
Name: 'Robert Reagan',
1366+
}, {
1367+
ID: 5,
1368+
Name: 'Greta Sims',
1369+
}, {
1370+
ID: 6,
1371+
Name: 'Brett Wade',
1372+
}, {
1373+
ID: 7,
1374+
Name: 'Sandra Johnson',
1375+
}, {
1376+
ID: 8,
1377+
Name: 'Ed Holmes',
1378+
}, {
1379+
ID: 9,
1380+
Name: 'Barb Banks',
1381+
}, {
1382+
ID: 10,
1383+
Name: 'Kevin Carter',
1384+
}, {
1385+
ID: 11,
1386+
Name: 'Cindy Stanwick',
1387+
}, {
1388+
ID: 12,
1389+
Name: 'Sammy Hill',
1390+
}, {
1391+
ID: 13,
1392+
Name: 'Davey Jones',
1393+
}, {
1394+
ID: 14,
1395+
Name: 'Victor Norris',
1396+
}, {
1397+
ID: 15,
1398+
Name: 'Mary Stern',
1399+
}, {
1400+
ID: 16,
1401+
Name: 'Robin Cosworth',
1402+
}, {
1403+
ID: 17,
1404+
Name: 'Kelly Rodriguez',
1405+
}, {
1406+
ID: 18,
1407+
Name: 'James Anderson',
1408+
}, {
1409+
ID: 19,
1410+
Name: 'Antony Remmen',
1411+
}, {
1412+
ID: 20,
1413+
Name: 'Olivia Peyton',
1414+
}, {
1415+
ID: 21,
1416+
Name: 'Taylor Riley',
1417+
}, {
1418+
ID: 22,
1419+
Name: 'Amelia Harper',
1420+
}, {
1421+
ID: 23,
1422+
Name: 'Wally Hobbs',
1423+
}, {
1424+
ID: 24,
1425+
Name: 'Brad Jameson',
1426+
}, {
1427+
ID: 25,
1428+
Name: 'Karen Goodson',
1429+
}, {
1430+
ID: 26,
1431+
Name: 'Marcus Orbison',
1432+
}, {
1433+
ID: 27,
1434+
Name: 'Sandy Bright',
1435+
}, {
1436+
ID: 28,
1437+
Name: 'Morgan Kennedy',
1438+
}, {
1439+
ID: 29,
1440+
Name: 'Violet Bailey',
1441+
}, {
1442+
ID: 30,
1443+
Name: 'Ken Samuelson',
1444+
}, {
1445+
ID: 31,
1446+
Name: 'Nat Maguiree',
1447+
}, {
1448+
ID: 32,
1449+
Name: 'Bart Arnaz',
1450+
}, {
1451+
ID: 33,
1452+
Name: 'Leah Simpson',
1453+
}, {
1454+
ID: 34,
1455+
Name: 'Arnie Schwartz',
1456+
}, {
1457+
ID: 35,
1458+
Name: 'Billy Zimmer',
1459+
}, {
1460+
ID: 36,
1461+
Name: 'Samantha Piper',
1462+
}, {
1463+
ID: 37,
1464+
Name: 'Maggie Boxter',
1465+
}, {
1466+
ID: 38,
1467+
Name: 'Terry Bradley',
1468+
}, {
1469+
ID: 39,
1470+
Name: 'Gabe Jones',
1471+
}, {
1472+
ID: 40,
1473+
Name: 'Lucy Ball',
1474+
}, {
1475+
ID: 41,
1476+
Name: 'Jim Packard',
1477+
}, {
1478+
ID: 42,
1479+
Name: 'Hannah Brookly',
1480+
}, {
1481+
ID: 43,
1482+
Name: 'Harv Mudd',
1483+
}, {
1484+
ID: 44,
1485+
Name: 'Clark Morgan',
1486+
}, {
1487+
ID: 45,
1488+
Name: 'Todd Hoffman',
1489+
}, {
1490+
ID: 46,
1491+
Name: 'Jackie Garmin',
1492+
}, {
1493+
ID: 47,
1494+
Name: 'Lincoln Bartlett',
1495+
}, {
1496+
ID: 48,
1497+
Name: 'Brad Farkus',
1498+
}, {
1499+
ID: 49,
1500+
Name: 'Jenny Hobbs',
1501+
}, {
1502+
ID: 50,
1503+
Name: 'Dallas Lou',
1504+
}, {
1505+
ID: 51,
1506+
Name: 'Stu Pizaro',
1507+
}];
1508+
1509+
export interface Priority {
1510+
id: number;
1511+
text: string;
1512+
postfix: string;
1513+
}
1514+
1515+
const priorities: Priority[] = [{
1516+
id: 1,
1517+
text: 'Low',
1518+
postfix: 'low',
1519+
},
1520+
{
1521+
id: 2,
1522+
text: 'Normal',
1523+
postfix: 'normal',
1524+
},
1525+
{
1526+
id: 3,
1527+
text: 'Urgent',
1528+
postfix: 'urgent',
1529+
},
1530+
{
1531+
id: 4,
1532+
text: 'High',
1533+
postfix: 'high',
1534+
},
1535+
];
1536+
13491537
@Injectable()
13501538
export class Service {
13511539
getTasks() {
13521540
return tasks;
13531541
}
1542+
1543+
getEmployees() {
1544+
return employees;
1545+
}
1546+
1547+
getPriorities() {
1548+
return priorities;
1549+
}
13541550
}

apps/demos/Demos/CardView/FieldTemplate/Angular/app/employee.service.ts

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)