Rename model attributes to remove underscore

master
Kevin C. Coram 2019-09-08 18:49:36 -04:00
parent 00577f888e
commit a6d883f68e
Signed by: kevin
GPG Key ID: 0342351B3D61AD35
5 changed files with 12 additions and 12 deletions

View File

@ -51,8 +51,8 @@ export class AppComponent implements OnInit, OnDestroy {
model.addresses.forEach(addr => {
addresses.push(
this.fb.group({
line1: [addr ? addr.line_1 : ''],
line2: [addr ? addr.line_2 : ''],
line1: [addr ? addr.line1 : ''],
line2: [addr ? addr.line2 : ''],
city: [addr ? addr.city : ''],
state: [addr ? addr.state : ''],
postalCode: [addr ? addr.postalCode : ''],

View File

@ -18,8 +18,8 @@ export class AddressComponent implements OnInit {
ngOnInit() {
this.group = this.fb.group({
line1: [this.address ? this.address.line_1 : ''],
line2: [this.address ? this.address.line_2 : ''],
line1: [this.address ? this.address.line1 : ''],
line2: [this.address ? this.address.line2 : ''],
city: [this.address ? this.address.city : ''],
state: [this.address ? this.address.state : ''],
postalCode : [this.address ? this.address.postalCode : ''],

View File

@ -7,8 +7,8 @@ export interface Name {
}
export interface Address {
line_1: string;
line_2: string;
line1: string;
line2: string;
city: string;
state: string;
postalCode: string;

View File

@ -28,8 +28,8 @@ export class ContactFormService {
model.addresses.forEach(addr => {
addresses.push(
this.fb.group({
line1: [addr ? addr.line_1 : ''],
line2: [addr ? addr.line_2 : ''],
line1: [addr ? addr.line1 : ''],
line2: [addr ? addr.line2 : ''],
city: [addr ? addr.city : ''],
state: [addr ? addr.state : ''],
postalCode: [addr ? addr.postalCode : ''],

View File

@ -13,15 +13,15 @@ const contact: Contact = {
},
addresses: [
{
line_1: '123 Main Street',
line_2: null,
line1: '123 Main Street',
line2: null,
city: 'New York',
state: 'NY',
postalCode: '12345',
},
{
line_1: '123 South Street',
line_2: null,
line1: '123 South Street',
line2: null,
city: 'Boston',
state: 'MA',
postalCode: '54321',