add componants: recipes and recipeAdd
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import {RecipesComponent} from './recipes/recipes.component'
|
||||
import {RecipeComponent} from './recipe/recipe.component'
|
||||
import {RecipeAddComponent} from './recipe-add/recipe-add.component'
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: 'recipes', component: RecipesComponent},
|
||||
{ path: 'recipe/add', component: RecipeAddComponent},
|
||||
{ path: 'recipe/:id', component: RecipeComponent}
|
||||
];
|
||||
|
1
src/app/recipe-add/recipe-add.component.html
Normal file
1
src/app/recipe-add/recipe-add.component.html
Normal file
@@ -0,0 +1 @@
|
||||
<p>recipe-add works!</p>
|
23
src/app/recipe-add/recipe-add.component.spec.ts
Normal file
23
src/app/recipe-add/recipe-add.component.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RecipeAddComponent } from './recipe-add.component';
|
||||
|
||||
describe('RecipeAddComponent', () => {
|
||||
let component: RecipeAddComponent;
|
||||
let fixture: ComponentFixture<RecipeAddComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [RecipeAddComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(RecipeAddComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
11
src/app/recipe-add/recipe-add.component.ts
Normal file
11
src/app/recipe-add/recipe-add.component.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recipe-add',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
templateUrl: './recipe-add.component.html',
|
||||
})
|
||||
export class RecipeAddComponent {
|
||||
|
||||
}
|
1
src/app/recipes/recipes.component.html
Normal file
1
src/app/recipes/recipes.component.html
Normal file
@@ -0,0 +1 @@
|
||||
<p>recipes works!</p>
|
23
src/app/recipes/recipes.component.spec.ts
Normal file
23
src/app/recipes/recipes.component.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RecipesComponent } from './recipes.component';
|
||||
|
||||
describe('RecipesComponent', () => {
|
||||
let component: RecipesComponent;
|
||||
let fixture: ComponentFixture<RecipesComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [RecipesComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(RecipesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
11
src/app/recipes/recipes.component.ts
Normal file
11
src/app/recipes/recipes.component.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recipes',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
templateUrl: './recipes.component.html',
|
||||
})
|
||||
export class RecipesComponent {
|
||||
|
||||
}
|
Reference in New Issue
Block a user