Format
This commit is contained in:
@@ -5,5 +5,8 @@ import { withComponentInputBinding } from '@angular/router';
|
||||
import { routes } from './app.routes';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes, withComponentInputBinding())],
|
||||
providers: [
|
||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||
provideRouter(routes, withComponentInputBinding()),
|
||||
],
|
||||
};
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { FormBuilder, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { Ingredient, IngredientEntry, Recipe } from '../../cookbook/type';
|
||||
import { RecipeService } from '../recipe.service';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recipe-add',
|
||||
@@ -11,7 +11,6 @@ import { Router } from '@angular/router';
|
||||
templateUrl: './recipe-add.component.html',
|
||||
})
|
||||
export class RecipeAddComponent {
|
||||
|
||||
createForm = this.formBuilder.group({
|
||||
name: ['', Validators.maxLength(256)],
|
||||
description: ['', Validators.maxLength(512)],
|
||||
@@ -37,7 +36,7 @@ export class RecipeAddComponent {
|
||||
this.createForm.patchValue({
|
||||
name: recipe.name,
|
||||
description: recipe.description,
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
constructor(private formBuilder: FormBuilder, private recipes: RecipeService, private router: Router) {}
|
||||
@@ -73,6 +72,6 @@ export class RecipeAddComponent {
|
||||
idIngredient: id,
|
||||
idRecipe: -1,
|
||||
quantity: 1,
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user