feat: add main component as app entry page

This commit is contained in:
2025-12-11 21:39:13 -03:00
parent 158440d5c8
commit 54ac7e0210
5 changed files with 60 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
import { Routes } from '@angular/router'; import { Routes } from '@angular/router';
import { Main } from './pages/main/main';
export const routes: Routes = []; export const routes: Routes = [
{
path: '',
component: Main,
pathMatch: 'full',
},
];

View File

@@ -0,0 +1,4 @@
<app-card
bgColor="var(--secondary)"
><app-contact-form class="form"></app-contact-form>
</app-card>

View File

@@ -0,0 +1,13 @@
app-card {
margin-top: 2rem;
width: 100%;
}
app-contact-form {
width: 100%;
}
.form {
display: inline-block;
padding: 3rem;
}

View File

@@ -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<Main>;
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();
});
});

View File

@@ -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 {}