From 54ac7e02106d5ec0caa0c58ea4ff707b07ab6b56 Mon Sep 17 00:00:00 2001 From: Gabriel De Los Rios Date: Thu, 11 Dec 2025 21:39:13 -0300 Subject: [PATCH] feat: add main component as app entry page --- src/app/app.routes.ts | 9 ++++++++- src/app/pages/main/main.html | 4 ++++ src/app/pages/main/main.scss | 13 +++++++++++++ src/app/pages/main/main.spec.ts | 24 ++++++++++++++++++++++++ src/app/pages/main/main.ts | 11 +++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/app/pages/main/main.html create mode 100644 src/app/pages/main/main.scss create mode 100644 src/app/pages/main/main.spec.ts create mode 100644 src/app/pages/main/main.ts diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index dc39edb..84c521d 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,3 +1,10 @@ import { Routes } from '@angular/router'; +import { Main } from './pages/main/main'; -export const routes: Routes = []; +export const routes: Routes = [ + { + path: '', + component: Main, + pathMatch: 'full', + }, +]; diff --git a/src/app/pages/main/main.html b/src/app/pages/main/main.html new file mode 100644 index 0000000..27e6af9 --- /dev/null +++ b/src/app/pages/main/main.html @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/src/app/pages/main/main.scss b/src/app/pages/main/main.scss new file mode 100644 index 0000000..37c1303 --- /dev/null +++ b/src/app/pages/main/main.scss @@ -0,0 +1,13 @@ +app-card { + margin-top: 2rem; + width: 100%; +} + +app-contact-form { + width: 100%; +} + +.form { + display: inline-block; + padding: 3rem; +} diff --git a/src/app/pages/main/main.spec.ts b/src/app/pages/main/main.spec.ts new file mode 100644 index 0000000..227fa53 --- /dev/null +++ b/src/app/pages/main/main.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { Main } from './main'; +import { STRINGS_INJECTOR } from '../../app.config'; +import { strings } from '../../strings'; + +describe('Main', () => { + let component: Main; + let fixture: ComponentFixture
; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Main], + providers: [{ provide: STRINGS_INJECTOR, useValue: strings }], + }).compileComponents(); + fixture = TestBed.createComponent(Main); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/main/main.ts b/src/app/pages/main/main.ts new file mode 100644 index 0000000..716572b --- /dev/null +++ b/src/app/pages/main/main.ts @@ -0,0 +1,11 @@ +import { Component } from '@angular/core'; +import { Card } from '../../components/card/card'; +import { ContactForm } from '../../components/contact-form/contact-form'; + +@Component({ + selector: 'app-main', + imports: [Card, ContactForm], + templateUrl: './main.html', + styleUrl: './main.scss', +}) +export class Main {}