Skip to content

Commit 861e15b

Browse files
Clarify the status of Collection Types in README.
There are bits of code partially handling this, and one is shown in the example, so it's worth clarifying that this doesn't actually work yet to avoid confusion.
1 parent 9f08b06 commit 861e15b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,27 @@ it as the `ng-model` of a form element as shown in the HTML example earlier in t
9595
A more complete example is available in [example/](example/) in the repository, and you can also
9696
[see the example live](http://saymedia.github.io/angularjs-dynamic-form/example/).
9797

98+
Collection Types
99+
----------------
100+
101+
The original design for this library called for supporting special "collection types", which
102+
are fields representing arrays or objects. The intent was that fields could have specifiers
103+
like `array<string>` which would cause the module to first look for a field type called
104+
`array` which could then transclude in a field for each item -- in this example the field
105+
element for `string`. This would allow a single field type to be created for editing arrays
106+
of any type, delegating to another field type for editing individual elements.
107+
108+
This feature is not yet implemented, although the collection type syntax can be parsed
109+
and will be ignored. The practical implication of this for the moment is that it is not
110+
possible to have field types containing `<` and `>` symbols.
111+
112+
The example linked above contains an ``array`` field element, but it is inoperable.
113+
Support for this may be added in a future version.
114+
115+
In the mean time, arrays of specific types can be supported manually by the caller, by
116+
creating a type name like `arrayOfString` and then populating that type's field element
117+
with a UI for adding and removing strings to the array given in `value`.
118+
98119
License
99120
-------
100121

0 commit comments

Comments
 (0)