Skip to content

Commit 6261d26

Browse files
committed
Add Title component with @input decorator
1 parent 961248c commit 6261d26

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div>
2+
<h2>{{ message }}</h2>
3+
<hr />
4+
</div>

src/app/shared/title/title.component.scss

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { TitleComponent } from './title.component';
4+
5+
describe('TitleComponent', () => {
6+
let component: TitleComponent;
7+
let fixture: ComponentFixture<TitleComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ TitleComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(TitleComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Component, Input } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-title',
5+
templateUrl: './title.component.html',
6+
styleUrls: ['./title.component.scss']
7+
})
8+
export class TitleComponent {
9+
@Input()
10+
message: string;
11+
}

0 commit comments

Comments
 (0)