Skip to content

Instantly share code, notes, and snippets.

@isummation
Last active September 14, 2017 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isummation/0795f810453886b4bb244d711b48f8c3 to your computer and use it in GitHub Desktop.
Save isummation/0795f810453886b4bb244d711b48f8c3 to your computer and use it in GitHub Desktop.
import { DynamicControlConfig } from './dynamic-form/dynamic-control.config';
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
formConfig: DynamicControlConfig[];
constructor() {
this.formConfig = [
{
type: 'text',
name: 'username',
label: 'Username',
placeholder: 'Type username',
}, {
type: 'password',
name: 'password',
label: 'Password',
placeholder: 'Type password',
}
];
}
onSubmit(event: any) {
console.log('form submitted', event);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment