Create component for business info

This commit is contained in:
Rene Vergara 2022-01-18 16:40:50 -06:00
parent 0044f25edb
commit ea8febe368
4 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,7 @@
* {
font-family: 'Spartan', sans-serif;
}
mat-card.centercard{
max-width: 450px;
border: 1px solid #CCCCCC;
}

View File

@ -0,0 +1,11 @@
<app-header></app-header>
<p>business works!</p>
<div align="center">
<mat-card class="centercard" [formGroup]="bizForm">
<p>Form</p>
<mat-form-field appearance="outline">
<mat-label>Business Name</mat-label>
<input matInput placeholder="Business Name" formControlName="name">
</mat-form-field>
</mat-card>
</div>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BusinessComponent } from './business.component';
describe('BusinessComponent', () => {
let component: BusinessComponent;
let fixture: ComponentFixture<BusinessComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ BusinessComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(BusinessComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,26 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators, FormGroup, FormControl } from '@angular/forms';
import { Owner } from '../owner.model';
import { UserService } from '../user.service';
@Component({
selector: 'app-business',
templateUrl: './business.component.html',
styleUrls: ['./business.component.css']
})
export class BusinessComponent implements OnInit {
bizForm: FormGroup;
constructor(
private fb: FormBuilder
) {
this.bizForm = fb.group({
name: ['', Validators.required]
});
}
ngOnInit(): void {
}
}