From 8b989b6d5866eea45a3e867e3b3a56ac114ff59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Wed, 5 Mar 2014 16:09:19 -0500 Subject: [PATCH] feat(forms): use the ng-form attribute as the name of the inner form Closes #681 --- lib/directive/ng_form.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/directive/ng_form.dart b/lib/directive/ng_form.dart index b4e43835d..99f4d6695 100644 --- a/lib/directive/ng_form.dart +++ b/lib/directive/ng_form.dart @@ -57,6 +57,15 @@ class NgForm extends NgControl { } } + //FIXME: fix this reflection bug that shows up when Map is implemented + operator []=(String key, value) { + if (key == 'name') { + name = value; + } else { + _controlByName[key] = value; + } + } + get controls => _controlByName; NgControl operator[](name) { @@ -68,6 +77,7 @@ class NgForm extends NgControl { class NgNullForm extends NgNullControl implements NgForm { NgNullForm() {} + operator []=(String key, value) {} operator[](name) {} get controls => null;