UniqueName Binding
uniqueName
Section titled “uniqueName”Purpose
Section titled “Purpose”The uniqueName binding ensures that the associated DOM element has a nonempty name attribute. If the DOM element did not have a name attribute, this binding gives it one and sets it to a unique string value.
You won’t need to use this often. It’s only useful when some other part of your app expects named form controls and you do not want to manage the name attribute yourself.
Example
Section titled “Example”<input data-bind="value: someModelProperty, uniqueName: true" />Parameters
Section titled “Parameters”-
Main parameter
Pass
true(or some value that evaluates as true) to enable theuniqueNamebinding, as in the preceding example. -
Additional parameters
- None
Dependencies
Section titled “Dependencies”None, other than the core Knockout library.