Last active
September 14, 2017 07:33
-
-
Save isummation/0795f810453886b4bb244d711b48f8c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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