Create component for business info
This commit is contained in:
parent
0044f25edb
commit
ea8febe368
4 changed files with 69 additions and 0 deletions
7
src/app/business/business.component.css
Normal file
7
src/app/business/business.component.css
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
* {
|
||||||
|
font-family: 'Spartan', sans-serif;
|
||||||
|
}
|
||||||
|
mat-card.centercard{
|
||||||
|
max-width: 450px;
|
||||||
|
border: 1px solid #CCCCCC;
|
||||||
|
}
|
11
src/app/business/business.component.html
Normal file
11
src/app/business/business.component.html
Normal 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>
|
25
src/app/business/business.component.spec.ts
Normal file
25
src/app/business/business.component.spec.ts
Normal 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();
|
||||||
|
});
|
||||||
|
});
|
26
src/app/business/business.component.ts
Normal file
26
src/app/business/business.component.ts
Normal 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 {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue