Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.