4,500
edits
Line 1: | Line 1: | ||
== Forms == | == Forms == | ||
=== FormBuilder === | |||
<syntaxhighlight lang="typescript"> | |||
export class DemoFormSkuBuilder { | |||
myForm: ControlGroup; | |||
constructor(fb: FormBuilder) { | |||
this.myForm = fb.group({ | |||
'sku': ['ABC123'] | |||
}); | |||
} | |||
onSubmit(value:string): void { | |||
console.log('you submitted value: ',value); | |||
} | |||
} | |||
</syntaxhighlight> | |||
=== @Component Annotation === | === @Component Annotation === |