angular-cn/aio/dist/generated/docs/api/common/HashLocationStrategy.json

5 lines
226 KiB
JSON
Raw Permalink Normal View History

{
"id": "api/common/HashLocationStrategy",
"title": "HashLocationStrategy",
"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/HashLocationStrategy\", \"name\": \"HashLocationStrategy\" } }\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/location/hash_location_strategy.ts?message=docs(common)%3A%20describe%20your%20change...#L14-L101\" 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/location/hash_location_strategy.ts#L14-L101\" 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=\"hashlocationstrategy\">HashLocationStrategy<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/HashLocationStrategy#hashlocationstrategy\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label class\">class</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>A <a href=\"api/common/LocationStrategy\"><code>LocationStrategy</code></a> used to configure the <a href=\"api/common/Location\"><code>Location</code></a> service to\nrepresent its state in the\n<a href=\"https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax\">hash fragment</a>\nof the browser's URL.</p>\n\n <p><a href=\"api/common/HashLocationStrategy#description\">See more...</a></p>\n </section>\n \n \n \n <section class=\"class-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\nclass <a href=\"api/common/HashLocationStrategy\" class=\"code-anchor\">HashLocationStrategy</a> extends <a class=\"code-anchor\" href=\"api/common/LocationStrategy\">LocationStrategy</a> implements <a class=\"code-anchor\" href=\"api/core/OnDestroy\">OnDestroy</a> {\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#ngOnDestroy\"><span class=\"member-name\">ngOnDestroy</span>(): void</a>\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#onPopState\"><span class=\"member-name\">onPopState</span>(fn: LocationChangeListener): void</a>\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#getBaseHref\"><span class=\"member-name\">getBaseHref</span>(): string</a>\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#path\"><span class=\"member-name\">path</span>(includeHash: boolean = false): string</a>\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#prepareExternalUrl\"><span class=\"member-name\">prepareExternalUrl</span>(internal: string): string</a>\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#pushState\"><span class=\"member-name\">pushState</span>(state: any, title: string, path: string, queryParams: string)</a>\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#replaceState\"><span class=\"member-name\">replaceState</span>(state: any, title: string, path: string, queryParams: string)</a>\n <a class=\"code-anchor\" href=\"api/common/HashLocationStrategy#forward\"><span class=\"member-name\">forward</span>(): void</a>\n <a class=\"code-anchor\" h
}