diff --git a/src/app/app.component.html b/src/app/app.component.html index acca372..5db310d 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,5 +1,6 @@

{{ title }}

+
diff --git a/src/app/app.module.ts b/src/app/app.module.ts index b1c6c96..81d71ae 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,10 +3,14 @@ import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; +import { ColorCardComponent } from './color-card/color-card.component'; +import { ColorListComponent } from './color-list/color-list.component'; @NgModule({ declarations: [ - AppComponent + AppComponent, + ColorCardComponent, + ColorListComponent ], imports: [ BrowserModule, diff --git a/src/app/color-card/color-card.component.css b/src/app/color-card/color-card.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/color-card/color-card.component.html b/src/app/color-card/color-card.component.html new file mode 100644 index 0000000..f2ff603 --- /dev/null +++ b/src/app/color-card/color-card.component.html @@ -0,0 +1,4 @@ +
+

{{cause}}

+

{{htmlcolor}}

+
diff --git a/src/app/color-card/color-card.component.spec.ts b/src/app/color-card/color-card.component.spec.ts new file mode 100644 index 0000000..af734db --- /dev/null +++ b/src/app/color-card/color-card.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ColorCardComponent } from './color-card.component'; + +describe('ColorCardComponent', () => { + let component: ColorCardComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ColorCardComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ColorCardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/color-card/color-card.component.ts b/src/app/color-card/color-card.component.ts new file mode 100644 index 0000000..1ddca89 --- /dev/null +++ b/src/app/color-card/color-card.component.ts @@ -0,0 +1,14 @@ +import { Component, Input } from '@angular/core'; + +@Component({ + selector: 'app-color-card', + templateUrl: './color-card.component.html', + styleUrls: ['./color-card.component.css'] +}) +export class ColorCardComponent { + @Input() cause:string = "pink" + @Input() htmlcolor:string ="pink" + constructor() { } + + +} diff --git a/src/app/color-list/color-list.component.css b/src/app/color-list/color-list.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/color-list/color-list.component.html b/src/app/color-list/color-list.component.html new file mode 100644 index 0000000..d8155e9 --- /dev/null +++ b/src/app/color-list/color-list.component.html @@ -0,0 +1,6 @@ + + diff --git a/src/app/color-list/color-list.component.spec.ts b/src/app/color-list/color-list.component.spec.ts new file mode 100644 index 0000000..589590d --- /dev/null +++ b/src/app/color-list/color-list.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ColorListComponent } from './color-list.component'; + +describe('ColorListComponent', () => { + let component: ColorListComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ColorListComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ColorListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/color-list/color-list.component.ts b/src/app/color-list/color-list.component.ts new file mode 100644 index 0000000..0b97a81 --- /dev/null +++ b/src/app/color-list/color-list.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-color-list', + templateUrl: './color-list.component.html', + styleUrls: ['./color-list.component.css'] +}) +export class ColorListComponent { + list: {"cause":string, "htmlcolor":string}[] =[{"cause":"Breast Cancer","htmlcolor":"pink"},{"cause":"Birth Parents","htmlcolor":"pink"},{"cause":"Nursing Mothers","htmlcolor":"pink"}] +}