Skip to content

Commit 88743e4

Browse files
author
Your Name
committed
Angular Core Deep Dive Course
1 parent 90501df commit 88743e4

7 files changed

+60
-9
lines changed

src/app/app.component.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,10 @@
1212

1313
<button (click)="onEditCourse()" i18n>Edit Course</button>
1414

15-
16-
<div i18n>{ coursesTotal, plural, =0 {No courses available.}
17-
=1 {One course is available.}
18-
other {A total of {{coursesTotal}} courses are available.} }</div>
19-
2015
</div>
2116

2217
<div class="courses">
2318

24-
<h4 i18n="welcome message.|Greet the user a greeting at the beginning of the course.@@welcomeMessage">
25-
Welcome to the Angular Core Deep Dive Course</h4>
26-
2719
<course-card *ngFor="let course of courses "
2820
(courseChanged)="save($event)"
2921
type="beginner"

src/app/app.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export class AppComponent implements OnInit {
2525

2626
ngOnInit() {
2727

28+
const htmlElement = createCustomElement();
29+
2830
}
2931

3032
onEditCourse() {

src/app/app.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { AppComponent } from './app.component';
55
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
66
import {HttpClientModule} from '@angular/common/http';
77
import {CoursesModule} from './courses/courses.module';
8+
import { CourseTitleComponent } from './course-title/course-title.component';
89

910
@NgModule({
1011
declarations: [
11-
AppComponent
12+
AppComponent,
13+
CourseTitleComponent
1214
],
1315
imports: [
1416
BrowserModule,
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
.course-title {
4+
text-decoration: underline;
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
3+
<div class="course-title">
4+
5+
{{title}}
6+
7+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { CourseTitleComponent } from './course-title.component';
4+
5+
describe('CourseTitleComponent', () => {
6+
let component: CourseTitleComponent;
7+
let fixture: ComponentFixture<CourseTitleComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ CourseTitleComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(CourseTitleComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import {Component, Input, OnInit} from '@angular/core';
2+
3+
@Component({
4+
selector: 'course-title',
5+
templateUrl: './course-title.component.html',
6+
styleUrls: ['./course-title.component.css']
7+
})
8+
export class CourseTitleComponent implements OnInit {
9+
10+
@Input()
11+
title:string;
12+
13+
constructor() { }
14+
15+
ngOnInit() {
16+
}
17+
18+
}

0 commit comments

Comments
 (0)