5 lines
6.4 KiB
JSON
5 lines
6.4 KiB
JSON
{
|
|
"id": "api/common/I18nSelectPipe",
|
|
"title": "I18nSelectPipe",
|
|
"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/common\", \"name\": \"@angular/common\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/common/I18nSelectPipe\", \"name\": \"I18nSelectPipe\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/common\">@angular/common</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/src/pipes/i18n_select_pipe.ts?message=docs(common)%3A%20describe%20your%20change...#L11-L53\" 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/common/src/pipes/i18n_select_pipe.ts#L11-L53\" 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=\"i18nselectpipe\">I18nSelectPipe<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/I18nSelectPipe#i18nselectpipe\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label pipe\">pipe</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>Generic selector that displays the string that matches the current value.</p>\n\n <p><a href=\"api/common/I18nSelectPipe#description\">See more...</a></p>\n </section>\n \n \n \n<section class=\"pipe-overview\">\n <code-example hidecopy=\"true\" class=\"no-box api-heading\">{{ value_expression | <span class=\"kwd nocode\">i18nSelect</span> : mapping }}</code-example>\n\n <h2 id=\"ngmodule\">NgModule<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/I18nSelectPipe#ngmodule\"><i class=\"material-icons\">link</i></a></h2>\n<ul class=\"ngmodule-list\">\n\n <li>\n <a href=\"api/common/CommonModule\">\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box\">CommonModule</code-example>\n </a>\n </li>\n \n</ul>\n\n\n\n \n <h2 id=\"input-value\">Input value<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/I18nSelectPipe#input-value\"><i class=\"material-icons\">link</i></a></h2>\n <table class=\"is-full-width list-table parameters-table pipe-parameters\">\n <tbody>\n \n <tr class=\"pipe-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>value</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>a string to be internationalized.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n \n \n <h2 id=\"parameters\">Parameters<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/I18nSelectPipe#parameters\"><i class=\"material-icons\">link</i></a></h2>\n <table class=\"is-full-width list-table parameters-table pipe-parameters\">\n <tbody>\n \n <tr class=\"pipe-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>mapping</code>\n </td>\n <td class=\"param-type\"><code>object</code></td>\n <td class=\"param-description\">\n <p>an object that indicates the text that should be displayed\nfor different values of the provided <code>value</code>.</p>\n\n </td>\n </tr>\n </tbody>\n</table>\n \n</section>\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/common/I18nSelectPipe#description\"><i class=\"material-icons\">link</i></a></h2>\n <p>If none of the keys of the <code>mapping</code> match the <code>value</code>, then the content\nof the <code>other</code> key is returned when present, otherwise an empty string is returned.</p>\n\n <p>Further information available in the <a href=\"api/common/I18nSelectPipe#usage-notes\">Usage Notes</a>...</p>\n</section>\n\n\n \n<section class=\"usage-notes\">\n <h2 id=\"usage-notes\">Usage notes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/I18nSelectPipe#usage-notes\"><i class=\"material-icons\">link</i></a></h2>\n <h3 id=\"example\">Example<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/I18nSelectPipe#example\"><i class=\"material-icons\">link</i></a></h3>\n<code-example path=\"common/pipes/ts/i18n_pipe.ts\" region=\"I18nSelectPipeComponent\">\n@<a href=\"api/core/Component\" class=\"code-anchor\">Component</a>(\n {selector: 'i18n-select-pipe', template: `<div>{{gender | <a href=\"api/common/I18nSelectPipe\" class=\"code-anchor\">i18nSelect</a>: inviteMap}} </div>`})\nexport class I18nSelectPipeComponent {\n gender: string = 'male';\n inviteMap: any = {'male': 'Invite him.', 'female': 'Invite her.', 'other': 'Invite them.'};\n}\n\n</code-example>\n\n</section>\n\n\n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common\n - api/common/CommonModule\n - api/core/PipeTransform\n-->\n<!-- links from this doc:\n - /api\n - api/common\n - api/common/CommonModule\n - api/common/I18nSelectPipe#description\n - api/common/I18nSelectPipe#example\n - api/common/I18nSelectPipe#i18nselectpipe\n - api/common/I18nSelectPipe#input-value\n - api/common/I18nSelectPipe#ngmodule\n - api/common/I18nSelectPipe#parameters\n - api/common/I18nSelectPipe#usage-notes\n - api/core/Component\n - https://github.com/angular/angular/edit/master/packages/common/src/pipes/i18n_select_pipe.ts?message=docs(common)%3A%20describe%20your%20change...#L11-L53\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/src/pipes/i18n_select_pipe.ts#L11-L53\n-->"
|
|
} |