NgDocApiListIndexService
Loads the API lists of every API entry once, for the search palette. The data file of an entry is assets/ng-doc/SEGMENT/api-list.json, where the segment is the route of the entry in its API configuration, or the root when it has none.
The new engine lists every segment in the generated context (), so exactly those files are requested, and none when the site has no API entry. Otherwise the entries are found in the router configuration: a route that carries the route data key NG_DOC_API_LIST_SEGMENT_DATA names its segment, and a route that declaration pages live under (ENTRY/classes/SCOPE/NAME and so on) tries its last route segment, with the root as the fallback ("api" tries the root first, as that is the default route of an API entry). When the configuration shows no entry (lazy routes), the root list is loaded. A list that cannot be loaded is skipped quietly, and each file is requested at most once per application.
- Decorators
@Service
@Service ()
export class NgDocApiListIndexService { … }Members
Properties1 | ||||||||||
declarations: | Every declaration of the loaded API lists. | |||||||||
Methods2 | ||||||||||
(): Promise<void> | Starts loading the API lists of every API entry, once. | |||||||||
Signature Returns Promise<void> -A promise that settles when every list has loaded or failed. | ||||||||||
(…): void | Records an API list that is already loaded (the API index page loads its own), so the palette does not request it again. | |||||||||
Signature Parameters
Returns void | ||||||||||