diff --git a/db.json b/db.json index a0fabe53..b08fb7e1 100644 --- a/db.json +++ b/db.json @@ -29,6 +29,16 @@ "province": "pe", "phone": "23453453454", "age": 18 + }, + { + "id": "1fl2", + "name": "Giulio", + "lastname": "Diomede", + "email": "flavio.bonta@gmail.com", + "fiscalcode": "tdyfuvyghuj", + "province": "pe", + "phone": "23453453454", + "age": 18 } ] } \ No newline at end of file diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 7011f01c..7e9a07e6 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -6,8 +6,8 @@ import { UserComponent } from './user/user.component'; import { UserDetailComponent } from './user-detail/user-detail.component'; import { FormsModule } from '@angular/forms'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { UserService } from './services/user.service'; import { UserDataComponent } from './user-data/user-data.component'; +import { LoginComponent } from './login/login.component'; const routes: Routes = [ @@ -26,6 +26,11 @@ const routes: Routes = [ path: 'users/new', component: UserDetailComponent, }, + { + path: 'users/login', + pathMatch:'full', + component: LoginComponent , + }, { path: 'users/:id/edit', component: UserDetailComponent, @@ -35,6 +40,7 @@ const routes: Routes = [ component: UserDataComponent, }, + ]; @NgModule({ @@ -42,6 +48,9 @@ const routes: Routes = [ UsersComponent, UserComponent, UserDetailComponent, + LoginComponent, + UserDataComponent, + ], imports: [RouterModule.forRoot(routes), FormsModule, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e3b47eda..a602b389 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,7 +3,6 @@ import { BrowserModule, provideClientHydration } from '@angular/platform-browser import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { NavComponent } from './nav/nav.component'; -import { UserDataComponent } from './user-data/user-data.component'; import { HttpClientModule } from '@angular/common/http'; @@ -11,7 +10,7 @@ import { HttpClientModule } from '@angular/common/http'; declarations: [ AppComponent, NavComponent, - UserDataComponent, + ], imports: [ diff --git a/src/app/classes/templog.ts b/src/app/classes/templog.ts new file mode 100644 index 00000000..605560b4 --- /dev/null +++ b/src/app/classes/templog.ts @@ -0,0 +1,12 @@ +import { TempLogInterface } from "../interfaces/templog"; + +export class TempLog implements TempLogInterface{ + name: string; + lastname: string; + + constructor(){ + this.name = ''; + this.lastname = ''; + } + +} \ No newline at end of file diff --git a/src/app/interfaces/templog.ts b/src/app/interfaces/templog.ts new file mode 100644 index 00000000..9507ffda --- /dev/null +++ b/src/app/interfaces/templog.ts @@ -0,0 +1,6 @@ +export interface TempLogInterface { + + name: string; + lastname: string; + + } \ No newline at end of file diff --git a/src/app/login/login.component.css b/src/app/login/login.component.css new file mode 100644 index 00000000..e69de29b diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html new file mode 100644 index 00000000..093aa12f --- /dev/null +++ b/src/app/login/login.component.html @@ -0,0 +1,17 @@ +
diff --git a/src/app/login/login.component.spec.ts b/src/app/login/login.component.spec.ts new file mode 100644 index 00000000..f1c475b7 --- /dev/null +++ b/src/app/login/login.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LoginComponent } from './login.component'; + +describe('LoginComponent', () => { + let component: LoginComponent; + let fixture: ComponentFixture