refactor: reorganize component structure and files
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {RouterOutlet} from '@angular/router';
|
||||
import {TableComponent} from "./table/table.component";
|
||||
import {FormComponent} from "./form/form.component";
|
||||
import {TableComponent} from "./components/table/table.component";
|
||||
import {FormComponent} from "./components/form/form.component";
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
imports: [RouterOutlet, TableComponent, FormComponent],
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.css',
|
||||
standalone: true,
|
||||
})
|
||||
export class AppComponent {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {Component, effect, inject, model} from '@angular/core';
|
||||
import {Todo} from "../dto/models";
|
||||
import {Todo} from "../../shii/dto/models";
|
||||
import {FormBuilder, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {DatePipe} from "@angular/common";
|
||||
import {TodoService} from "../service/todo.service";
|
||||
import {TodoService} from "../../shii/service/todo.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-form',
|
||||
@ -11,7 +11,6 @@ import {TodoService} from "../service/todo.service";
|
||||
],
|
||||
templateUrl: './form.component.html',
|
||||
standalone: true,
|
||||
styleUrl: './form.component.css'
|
||||
})
|
||||
export class FormComponent {
|
||||
todo = model<Todo|null>(null);
|
@ -1,7 +1,7 @@
|
||||
import {Component, effect, EventEmitter, inject, signal, Signal, WritableSignal} from '@angular/core';
|
||||
import {TodoService} from "../service/todo.service";
|
||||
import {TodoService} from "../../shii/service/todo.service";
|
||||
import {DatePipe} from "@angular/common";
|
||||
import {Todo} from "../dto/models";
|
||||
import {Todo} from "../../shii/dto/models";
|
||||
|
||||
@Component({
|
||||
selector: 'app-table',
|
||||
@ -10,7 +10,6 @@ import {Todo} from "../dto/models";
|
||||
DatePipe,
|
||||
],
|
||||
templateUrl: './table.component.html',
|
||||
styleUrl: './table.component.css'
|
||||
})
|
||||
export class TableComponent {
|
||||
todoService: TodoService = inject(TodoService);
|
Reference in New Issue
Block a user