diff --git a/project/src/app/app.component.html b/project/src/app/app.component.html index dab2166..a2fe6f3 100644 --- a/project/src/app/app.component.html +++ b/project/src/app/app.component.html @@ -1,4 +1,4 @@ - +
diff --git a/project/src/app/app.component.spec.ts b/project/src/app/app.component.spec.ts deleted file mode 100644 index c136a0b..0000000 --- a/project/src/app/app.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it(`should have as title 'project'`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('project'); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('.content span')?.textContent).toContain('project app is running!'); - }); -}); diff --git a/project/src/app/app.component.ts b/project/src/app/app.component.ts index 06499a0..767f161 100644 --- a/project/src/app/app.component.ts +++ b/project/src/app/app.component.ts @@ -6,10 +6,9 @@ import { Component } from '@angular/core'; styleUrls: ['./app.component.css'] }) export class AppComponent { - title = 'project'; loadedFeature = 'recipe'; - onNavgate(feature: string) { + onNavigate(feature: string) { this.loadedFeature = feature; } } diff --git a/project/src/app/app.module.ts b/project/src/app/app.module.ts index 6685335..76fe72d 100644 --- a/project/src/app/app.module.ts +++ b/project/src/app/app.module.ts @@ -1,6 +1,6 @@ -import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; - +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; import { HeaderComponent } from './header/header.component'; import { RecipesComponent } from './recipes/recipes.component'; @@ -22,9 +22,10 @@ import { ShoppingEditComponent } from './shopping-list/shopping-edit/shopping-ed ShoppingEditComponent ], imports: [ - BrowserModule + BrowserModule, + FormsModule, ], providers: [], bootstrap: [AppComponent] }) -export class AppModule { } +export class AppModule { } \ No newline at end of file diff --git a/project/src/app/header/header.component.html b/project/src/app/header/header.component.html index 9c8ddbc..c8df7dc 100644 --- a/project/src/app/header/header.component.html +++ b/project/src/app/header/header.component.html @@ -5,15 +5,15 @@