Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 8b989b6

Browse files
matskomhevery
authored andcommitted
feat(forms): use the ng-form attribute as the name of the inner form
Closes #681
1 parent 4c9b804 commit 8b989b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/directive/ng_form.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ class NgForm extends NgControl {
5757
}
5858
}
5959

60+
//FIXME: fix this reflection bug that shows up when Map is implemented
61+
operator []=(String key, value) {
62+
if (key == 'name') {
63+
name = value;
64+
} else {
65+
_controlByName[key] = value;
66+
}
67+
}
68+
6069
get controls => _controlByName;
6170

6271
NgControl operator[](name) {
@@ -68,6 +77,7 @@ class NgForm extends NgControl {
6877

6978
class NgNullForm extends NgNullControl implements NgForm {
7079
NgNullForm() {}
80+
operator []=(String key, value) {}
7181
operator[](name) {}
7282

7383
get controls => null;

0 commit comments

Comments
 (0)