5 lines
24 KiB
JSON
5 lines
24 KiB
JSON
{
|
|
"id": "api/platform-browser/makeStateKey",
|
|
"title": "makeStateKey",
|
|
"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/platform-browser\", \"name\": \"@angular/platform-browser\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/platform-browser/makeStateKey\", \"name\": \"makeStateKey\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/platform-browser\">@angular/platform-browser</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/platform-browser/src/browser/transfer_state.ts?message=docs(platform-browser)%3A%20describe%20your%20change...#L49-L66\" 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/platform-browser/src/browser/transfer_state.ts#L49-L66\" 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=\"makestatekey\">makeStateKey<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/platform-browser/makeStateKey#makestatekey\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label function\">function</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>Create a <code><a href=\"api/platform-browser/StateKey\" class=\"code-anchor\">StateKey</a><T></code> that can be used to store value of type T with <code><a href=\"api/platform-browser/TransferState\" class=\"code-anchor\">TransferState</a></code>.</p>\n\n <p><a href=\"api/platform-browser/makeStateKey#description\">See more...</a></p>\n </section>\n \n \n \n\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"> <span class=\"member-name\"><a href=\"api/platform-browser/makeStateKey\" class=\"code-anchor\">makeStateKey</a></span><T = void>(key: string): <a href=\"api/platform-browser/StateKey\" class=\"code-anchor\">StateKey</a><T></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table function-overload-parameters\">\n <tbody>\n \n <tr class=\"function-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>key</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns\">Returns</h6>\n <p><code><a href=\"api/platform-browser/StateKey\" class=\"code-anchor\">StateKey</a><T></code></p>\n\n \n\n\n \n\n \n</div>\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/platform-browser/makeStateKey#description\"><i class=\"material-icons\">link</i></a></h2>\n <p>Example:</p>\n<code-example>\nconst COUNTER_KEY = <a href=\"api/platform-browser/makeStateKey\" class=\"code-anchor\">makeStateKey</a><number>('counter');\nlet value = 10;\n\ntransferState.set(COUNTER_KEY, value);\n</code-example>\n\n \n</section>\n\n\n\n \n\n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/platform-browser\n - api/platform-browser/StateKey\n-->\n<!-- links from this doc:\n - /api\n - api/platform-browser\n - api/platform-browser/StateKey\n - api/platform-browser/TransferState\n - api/platform-browser/makeStateKey#description\n - api/platform-browser/makeStateKey#makestatekey\n - https://github.com/angular/angular/edit/master/packages/platform-browser/src/browser/transfer_state.ts?message=docs(platform-browser)%3A%20describe%20your%20change...#L49-L66\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/platform-browser/src/browser/transfer_state.ts#L49-L66\n-->"
|
|
} |