5 lines
8.8 KiB
JSON
5 lines
8.8 KiB
JSON
{
|
|
"id": "api/forms/SelectMultipleControlValueAccessor",
|
|
"title": "SelectMultipleControlValueAccessor",
|
|
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/forms\", \"name\": \"@angular/forms\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/forms/SelectMultipleControlValueAccessor\", \"name\": \"SelectMultipleControlValueAccessor\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/forms\">@angular/forms</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/forms/src/directives/select_multiple_control_value_accessor.ts?message=docs(forms)%3A%20describe%20your%20change...#L42-L218\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/forms/src/directives/select_multiple_control_value_accessor.ts#L42-L218\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"selectmultiplecontrolvalueaccessor\">SelectMultipleControlValueAccessor<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#selectmultiplecontrolvalueaccessor\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label directive\">directive</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>The <code><a href=\"api/forms/ControlValueAccessor\" class=\"code-anchor\">ControlValueAccessor</a></code> for writing multi-select control values and listening to multi-select\ncontrol changes. The value accessor is used by the <code><a href=\"api/forms/FormControlDirective\" class=\"code-anchor\">FormControlDirective</a></code>, <code><a href=\"api/forms/FormControlName\" class=\"code-anchor\">FormControlName</a></code>, and\n<code><a href=\"api/forms/NgModel\" class=\"code-anchor\">NgModel</a></code> directives.</p>\n\n \n </section>\n \n \n \n \n<section class=\"see-also\">\n <h2 id=\"see-also\">See also<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#see-also\"><i class=\"material-icons\">link</i></a></h2>\n <ul>\n \n <li><p><code><a href=\"api/forms/SelectControlValueAccessor\" class=\"code-anchor\">SelectControlValueAccessor</a></code></p>\n</li>\n </ul>\n</section>\n\n\n <h2 id=\"ngmodules\">NgModules<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#ngmodules\"><i class=\"material-icons\">link</i></a></h2>\n<ul class=\"ngmodule-list\">\n\n <li>\n <a href=\"api/forms/ReactiveFormsModule\">\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">ReactiveFormsModule</code-example>\n </a>\n </li>\n \n <li>\n <a href=\"api/forms/FormsModule\">\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">FormsModule</code-example>\n </a>\n </li>\n \n</ul>\n\n\n \n<section class=\"selector-list\">\n <h2 id=\"selectors\">Selectors<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#selectors\"><i class=\"material-icons\">link</i></a></h2>\n \n <ul>\n <li><code>select[<a href=\"api/forms/SelectMultipleControlValueAccessor\" class=\"code-anchor\">multiple</a>][<a href=\"api/forms/FormControlName\" class=\"code-anchor\">formControlName</a>]</code></li>\n \n <li><code>select[<a href=\"api/forms/SelectMultipleControlValueAccessor\" class=\"code-anchor\">multiple</a>][formControl]</code></li>\n \n <li><code>select[<a href=\"api/forms/SelectMultipleControlValueAccessor\" class=\"code-anchor\">multiple</a>][<a href=\"api/forms/NgModel\" class=\"code-anchor\">ngModel</a>]</code></li>\n \n </ul>\n \n</section>\n\n\n\n \n\n<section class=\"instance-properties\">\n <h2 id=\"properties\">Properties<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#properties\"><i class=\"material-icons\">link</i></a></h2>\n <table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th>Property</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"instance-property\">\n <td>\n <a id=\"compareWith\"></a>\n <code class=\"\"><span class=\"property-binding\">@<a href=\"api/core/Input\" class=\"code-anchor\">Input</a>()</span><br><span class=\"member-name\">compareWith</span>: (o1: any, o2: any) => boolean</code>\n </td>\n <td><span class=\"write-only-property\">Write-Only</span>\n \n <p>Tracks the option comparison algorithm for tracking identities when\nchecking for changes.</p>\n\n \n </td>\n </tr>\n \n </tbody>\n </table>\n</section>\n\n\n\n \n\n\n \n <section class=\"description\">\n <h2 id=\"description\">Description<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#description\"><i class=\"material-icons\">link</i></a></h2>\n \n <h3 id=\"using-a-multi-select-control\">Using a multi-select control<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#using-a-multi-select-control\"><i class=\"material-icons\">link</i></a></h3>\n<p>The follow example shows you how to use a multi-select control with a reactive form.</p>\n<code-example language=\"ts\">\nconst countryControl = new <a href=\"api/forms/FormControl\" class=\"code-anchor\">FormControl</a>();\n</code-example>\n<code-example>\n<select <a href=\"api/forms/SelectMultipleControlValueAccessor\" class=\"code-anchor\">multiple</a> name=\"countries\" [formControl]=\"countryControl\">\n <option *<a href=\"api/common/NgForOf\" class=\"code-anchor\">ngFor</a>=\"let country of countries\" [ngValue]=\"country\">\n {{ country.name }}\n </option>\n</select>\n</code-example>\n<h3 id=\"customizing-option-selection\">Customizing option selection<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/forms/SelectMultipleControlValueAccessor#customizing-option-selection\"><i class=\"material-icons\">link</i></a></h3>\n<p>To customize the default option comparison algorithm, <code><select></code> supports <code>compareWith</code> input.\nSee the <code><a href=\"api/forms/SelectControlValueAccessor\" class=\"code-anchor\">SelectControlValueAccessor</a></code> for usage.</p>\n\n </section>\n \n\n \n\n \n\n \n\n \n \n \n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/animations/transition\n - api/common/NgSwitch\n - api/forms\n - api/forms/ControlValueAccessor\n - api/forms/FormsModule\n - api/forms/ReactiveFormsModule\n - api/forms/SelectControlValueAccessor\n - guide/cli-builder\n - guide/component-overview\n - guide/http\n-->\n<!-- links from this doc:\n - /api\n - api/common/NgForOf\n - api/core/Input\n - api/forms\n - api/forms/ControlValueAccessor\n - api/forms/FormControl\n - api/forms/FormControlDirective\n - api/forms/FormControlName\n - api/forms/FormsModule\n - api/forms/NgModel\n - api/forms/ReactiveFormsModule\n - api/forms/SelectControlValueAccessor\n - api/forms/SelectMultipleControlValueAccessor#customizing-option-selection\n - api/forms/SelectMultipleControlValueAccessor#description\n - api/forms/SelectMultipleControlValueAccessor#ngmodules\n - api/forms/SelectMultipleControlValueAccessor#properties\n - api/forms/SelectMultipleControlValueAccessor#see-also\n - api/forms/SelectMultipleControlValueAccessor#selectmultiplecontrolvalueaccessor\n - api/forms/SelectMultipleControlValueAccessor#selectors\n - api/forms/SelectMultipleControlValueAccessor#using-a-multi-select-control\n - https://github.com/angular/angular/edit/master/packages/forms/src/directives/select_multiple_control_value_accessor.ts?message=docs(forms)%3A%20describe%20your%20change...#L42-L218\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/forms/src/directives/select_multiple_control_value_accessor.ts#L42-L218\n-->"
|
|
} |