feat: add main component as app entry page
This commit is contained in:
@@ -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',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|||||||
4
src/app/pages/main/main.html
Normal file
4
src/app/pages/main/main.html
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<app-card
|
||||||
|
bgColor="var(--secondary)"
|
||||||
|
><app-contact-form class="form"></app-contact-form>
|
||||||
|
</app-card>
|
||||||
13
src/app/pages/main/main.scss
Normal file
13
src/app/pages/main/main.scss
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
app-card {
|
||||||
|
margin-top: 2rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
app-contact-form {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 3rem;
|
||||||
|
}
|
||||||
24
src/app/pages/main/main.spec.ts
Normal file
24
src/app/pages/main/main.spec.ts
Normal 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();
|
||||||
|
});
|
||||||
|
});
|
||||||
11
src/app/pages/main/main.ts
Normal file
11
src/app/pages/main/main.ts
Normal 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 {}
|
||||||
Reference in New Issue
Block a user