Skip to content

Commit 50c1e4d

Browse files
author
Your Name
committed
Angular Material In Depth
1 parent 7d558c8 commit 50c1e4d

File tree

4 files changed

+50
-24
lines changed

4 files changed

+50
-24
lines changed

package-lock.json

Lines changed: 18 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555
"tslint": "~6.1.0",
5656
"typescript": "4.4.4"
5757
}
58-
}
58+
}

src/app/courses-card-list/courses-card-list.component.html

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,50 @@
11

22

3-
<mat-card class="course-card mat-elevation-z7" *ngFor="let course of courses">
3+
<mat-grid-list [cols]="2" [rowHeight]="'500px'">
44

5-
<mat-card-header>
5+
<mat-grid-tile *ngFor="let course of courses">
66

7-
<mat-card-title>{{course.description}}</mat-card-title>
7+
<mat-card class="course-card mat-elevation-z7">
88

9-
</mat-card-header>
9+
<mat-card-header>
1010

11+
<mat-card-title>{{course.description}}</mat-card-title>
1112

12-
<img mat-card-image [src]="course.iconUrl">
13+
</mat-card-header>
1314

1415

16+
<img mat-card-image [src]="course.iconUrl">
1517

16-
<mat-card-content>
1718

18-
<p>{{course.longDescription}}</p>
1919

20-
</mat-card-content>
20+
<mat-card-content>
2121

22+
<p>{{course.longDescription}}</p>
2223

23-
<mat-card-actions class="course-actions">
24+
</mat-card-content>
2425

25-
<button mat-raised-button color="primary"
26-
[routerLink]="['courses', course.id]">
27-
VIEW COURSE
28-
</button>
2926

30-
<button mat-raised-button color="accent" (click)="editCourse(course)">
31-
EDIT COURSE
32-
</button>
27+
<mat-card-actions class="course-actions">
3328

34-
</mat-card-actions>
29+
<button mat-raised-button color="primary"
30+
[routerLink]="['courses', course.id]">
31+
VIEW COURSE
32+
</button>
33+
34+
<button mat-raised-button color="accent" (click)="editCourse(course)">
35+
EDIT COURSE
36+
</button>
37+
38+
</mat-card-actions>
39+
40+
41+
42+
</mat-card>
43+
44+
</mat-grid-tile>
45+
46+
47+
</mat-grid-list>
3548

3649

3750

38-
</mat-card>

src/app/home/home.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
.courses-panel {
4-
max-width: 400px;
4+
max-width: 1500px;
55
margin: 0 auto;
66
}
77

0 commit comments

Comments
 (0)