5 lines
9.0 KiB
JSON
5 lines
9.0 KiB
JSON
{
|
|
"id": "api/common/NgSwitchCase",
|
|
"title": "NgSwitchCase",
|
|
"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/NgSwitchCase\", \"name\": \"NgSwitchCase\" } }\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/directives/ng_switch.ts?message=docs(common)%3A%20describe%20your%20change...#L156-L211\" 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/directives/ng_switch.ts#L156-L211\" 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=\"ngswitchcase\">NgSwitchCase<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgSwitchCase#ngswitchcase\"><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>Provides a switch case expression to match against an enclosing <code><a href=\"api/common/NgSwitch\" class=\"code-anchor\">ngSwitch</a></code> expression.\nWhen the expressions match, the given <code><a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">NgSwitchCase</a></code> template is rendered.\nIf multiple match expressions match the switch expression value, all of them are displayed.</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/common/NgSwitchCase#see-also\"><i class=\"material-icons\">link</i></a></h2>\n <ul>\n \n <li><p><code><a href=\"api/common/NgSwitch\" class=\"code-anchor\">NgSwitch</a></code></p>\n</li>\n <li><p><code><a href=\"api/common/NgSwitchDefault\" class=\"code-anchor\">NgSwitchDefault</a></code></p>\n</li>\n </ul>\n</section>\n\n\n <h2 id=\"ngmodule\">NgModule<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgSwitchCase#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<section class=\"selector-list\">\n <h2 id=\"selectors\">Selectors<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgSwitchCase#selectors\"><i class=\"material-icons\">link</i></a></h2>\n \n <ul>\n <li><code>[<a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">ngSwitchCase</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/common/NgSwitchCase#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=\"ngSwitchCase\"></a>\n <code class=\"\"><span class=\"property-binding\">@<a href=\"api/core/Input\" class=\"code-anchor\">Input</a>()</span><br><span class=\"member-name\"><a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">ngSwitchCase</a></span>: any</code>\n </td>\n <td>\n \n <p>Stores the HTML template to be selected on match.</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/common/NgSwitchCase#description\"><i class=\"material-icons\">link</i></a></h2>\n \n <p>Within a switch container, <code>*<a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">ngSwitchCase</a></code> statements specify the match expressions\nas attributes. Include <code>*<a href=\"api/common/NgSwitchDefault\" class=\"code-anchor\">ngSwitchDefault</a></code> as the final case.</p>\n<code-example>\n<container-element [<a href=\"api/common/NgSwitch\" class=\"code-anchor\">ngSwitch</a>]=\"switch_expression\">\n <some-element *<a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">ngSwitchCase</a>=\"match_expression_1\">...</some-element>\n ...\n <some-element *<a href=\"api/common/NgSwitchDefault\" class=\"code-anchor\">ngSwitchDefault</a>>...</some-element>\n</container-element>\n</code-example>\n<p>Each switch-case statement contains an in-line HTML template or template reference\nthat defines the subtree to be selected if the value of the match expression\nmatches the value of the switch expression.</p>\n<p>Unlike JavaScript, which uses strict equality, Angular uses loose equality.\nThis means that the empty string, <code>\"\"</code> matches 0.</p>\n\n </section>\n \n\n \n\n \n\n \n\n<section class=\"instance-methods\">\n <h2 id=\"methods\">Methods<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgSwitchCase#methods\"><i class=\"material-icons\">link</i></a></h2>\n \n <a id=\"ngDoCheck\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"ngdocheck\">\n ngDoCheck()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/NgSwitchCase#ngdocheck\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/src/directives/ng_switch.ts?message=docs(common)%3A%20describe%20your%20change...#L204-L210\" 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/directives/ng_switch.ts#L204-L210\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Performs case matching. For internal use only.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"><span class=\"member-name\">ngDoCheck</span>()</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <p>There are no parameters.</p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n</section>\n\n \n \n \n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common\n - api/common/CommonModule\n - api/common/NgSwitch\n - api/common/NgSwitchDefault\n - api/core/DoCheck\n - guide/ajs-quick-reference\n - guide/built-in-directives\n - guide/dynamic-form\n-->\n<!-- links from this doc:\n - /api\n - api/common\n - api/common/CommonModule\n - api/common/NgSwitch\n - api/common/NgSwitchCase#description\n - api/common/NgSwitchCase#methods\n - api/common/NgSwitchCase#ngdocheck\n - api/common/NgSwitchCase#ngmodule\n - api/common/NgSwitchCase#ngswitchcase\n - api/common/NgSwitchCase#properties\n - api/common/NgSwitchCase#see-also\n - api/common/NgSwitchCase#selectors\n - api/common/NgSwitchDefault\n - api/core/Input\n - https://github.com/angular/angular/edit/master/packages/common/src/directives/ng_switch.ts?message=docs(common)%3A%20describe%20your%20change...#L156-L211\n - https://github.com/angular/angular/edit/master/packages/common/src/directives/ng_switch.ts?message=docs(common)%3A%20describe%20your%20change...#L204-L210\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/src/directives/ng_switch.ts#L156-L211\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/src/directives/ng_switch.ts#L204-L210\n-->"
|
|
} |