From 31cb037f57f2d37734a62681f919761627b5189a Mon Sep 17 00:00:00 2001 From: David Pertiller Date: Fri, 13 Nov 2015 23:33:38 +0100 Subject: [PATCH] Added ngModelElAttrs property The field configuration object supports a property called `ngModelElAttrs` which allows you to place attributes with string values on the ng-model element. It's a straightforward alternative to ngModelAttrs and was implemented as a result of this issue: https://github.com/formly-js/angular-formly/issues/378#issuecomment-127211353 --- angular-formly/angular-formly.d.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/angular-formly/angular-formly.d.ts b/angular-formly/angular-formly.d.ts index 9917d217f..55bffe872 100644 --- a/angular-formly/angular-formly.d.ts +++ b/angular-formly/angular-formly.d.ts @@ -301,6 +301,17 @@ declare module AngularFormly { }; + /** + * This allows you to place attributes with string values on the ng-model element. + * Easy to use alternative to ngModelAttrs option. + * + * see http://docs.angular-formly.com/docs/field-configuration-object#ngmodelelattrs-object + */ + ngModelElAttrs?: { + [key: string]: string; + }; + + /** * Used to tell angular-formly to not attempt to add the formControl property to your object. This is useful * for things like validation, but not necessary if your "field" doesn't use ng-model (if it's just a horizontal @@ -572,4 +583,4 @@ declare module AngularFormly { messages: { [key: string]: ($viewValue: any, $modelValue: any, scope: ITemplateScope) => string }; } -} \ No newline at end of file +}