Skip to content

Commit dba1b3b

Browse files
author
Your Name
committed
Angular Core Deep Dive
1 parent 8e4818d commit dba1b3b

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

src/app/app.component.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55

66
</div>
77

8-
98
<div class="courses">
109

10+
<course-card [course]="coreCourse"></course-card>
1111

12-
<course-card></course-card>
13-
14-
<course-card></course-card>
15-
16-
<course-card></course-card>
17-
12+
<course-card [course]="rxjsCourse"></course-card>
1813

14+
<course-card [course]="ngrxCourse"></course-card>
1915

2016
</div>
2117

src/app/app.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ import {COURSES} from '../db-data';
99
export class AppComponent {
1010

1111

12+
coreCourse = COURSES[0];
13+
14+
rxjsCourse = COURSES[1];
15+
16+
ngrxCourse = COURSES[2];
1217

1318
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div class="course-card">
22

33
<div class="course-title">
4-
Angular Core Deep Dive
4+
{{ course.description }}
55
</div>
66
<img width="300" alt="Angular Logo"
7-
src="https://s3-us-west-1.amazonaws.com/angular-university/course-images/angular-core-in-depth-small.png">
7+
[src]="course.iconUrl">
88

99
<div class="course-description">
10-
A detailed walk-through of the most important part of Angular - the Core and Common modules.
10+
{{ course.longDescription }}
1111
</div>
1212

1313
</div>
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import {Component, Input, OnInit} from '@angular/core';
2+
import {COURSES} from '../../db-data';
3+
import {Course} from '../model/course';
24

35
@Component({
4-
selector: 'course-card',
5-
templateUrl: './course-card.component.html',
6-
styleUrls: ['./course-card.component.css']
6+
selector: 'course-card',
7+
templateUrl: './course-card.component.html',
8+
styleUrls: ['./course-card.component.css']
79
})
810
export class CourseCardComponent implements OnInit {
911

10-
constructor() { }
12+
@Input()
13+
course: Course;
1114

12-
ngOnInit() {
13-
}
15+
constructor() {
16+
}
17+
18+
ngOnInit() {
19+
}
1420

1521
}

0 commit comments

Comments
 (0)