5 lines
28 KiB
JSON
5 lines
28 KiB
JSON
{
|
|
"id": "api/router/testing/SpyNgModuleFactoryLoader",
|
|
"title": "SpyNgModuleFactoryLoader",
|
|
"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/router\", \"name\": \"@angular/router\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/router/testing\", \"name\": \"@angular/router/testing\" } },\n { \"@type\": \"ListItem\", \"position\": 4, \"item\": { \"@id\": \"https://angular.io/api/router/testing/SpyNgModuleFactoryLoader\", \"name\": \"SpyNgModuleFactoryLoader\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/router\">@angular/router</a> > <a href=\"api/router/testing\">@angular/router/testing</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/testing/src/router_testing_module.ts?message=docs(router)%3A%20describe%20your%20change...#L13-L79\" 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/router/testing/src/router_testing_module.ts#L13-L79\" 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=\"spyngmodulefactoryloader\">SpyNgModuleFactoryLoader<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/testing/SpyNgModuleFactoryLoader#spyngmodulefactoryloader\"><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>Allows to simulate the loading of ng modules in tests.</p>\n\n <p><a href=\"api/router/testing/SpyNgModuleFactoryLoader#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/router/testing/SpyNgModuleFactoryLoader\" class=\"code-anchor\">SpyNgModuleFactoryLoader</a> implements <a class=\"code-anchor\" href=\"api/core/NgModuleFactoryLoader\">NgModuleFactoryLoader</a> {\n <a class=\"code-anchor\" href=\"api/router/testing/SpyNgModuleFactoryLoader#stubbedModules\"><span class=\"member-name\">stubbedModules</span>: {...}</a>\n <a class=\"code-anchor\" href=\"api/router/testing/SpyNgModuleFactoryLoader#load\"><span class=\"member-name\">load</span>(path: string): Promise<NgModuleFactory<any>></a>\n}\n</code-example>\n\n \n \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/router/testing/SpyNgModuleFactoryLoader#description\"><i class=\"material-icons\">link</i></a></h2>\n <code-example>\nconst loader = TestBed.inject(<a href=\"api/core/NgModuleFactoryLoader\" class=\"code-anchor\">NgModuleFactoryLoader</a>);\n\n@<a href=\"api/core/Component\" class=\"code-anchor\">Component</a>({template: 'lazy-loaded'})\nclass LazyLoadedComponent {}\n@<a href=\"api/core/NgModule\" class=\"code-anchor\">NgModule</a>({\n declarations: [LazyLoadedComponent],\n imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n})\n\nclass LoadedModule {}\n\n// sets up stubbedModules\nloader.stubbedModules = {lazyModule: LoadedModule};\n\nrouter.resetConfig([\n {path: 'lazy', loadChildren: 'lazyModule'},\n]);\n\nrouter.navigateByUrl('/lazy/loaded');\n</code-example>\n\n \n</section>\n\n \n\n\n\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/router/testing/SpyNgModuleFactoryLoader#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=\"stubbedModules\"></a>\n <code class=\"\"><span class=\"member-name\">stubbedModules</span>: {\n [path: string]: any;\n}</code>\n </td>\n <td>\n \n \n \n </td>\n </tr>\n \n </tbody>\n </table>\n</section>\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/router/testing/SpyNgModuleFactoryLoader#methods\"><i class=\"material-icons\">link</i></a></h2>\n \n <a id=\"load\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"load\">\n load()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/router/testing/SpyNgModuleFactoryLoader#load\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/router/testing/src/router_testing_module.ts?message=docs(router)%3A%20describe%20your%20change...#L71-L78\" 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/router/testing/src/router_testing_module.ts#L71-L78\" 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 \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\">load</span>(path: string): Promise<<a href=\"api/core/NgModuleFactory\" class=\"code-anchor\">NgModuleFactory</a><any>></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>path</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>Promise<<a href=\"api/core/NgModuleFactory\" class=\"code-anchor\">NgModuleFactory</a><any>></code></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\n </div>\n</article>\n\n<!-- links to this doc:\n - api/core/NgModuleFactoryLoader\n - api/router/testing\n - api/router/testing/RouterTestingModule\n-->\n<!-- links from this doc:\n - /api\n - api/core/Component\n - api/core/NgModule\n - api/core/NgModuleFactory\n - api/core/NgModuleFactoryLoader\n - api/router\n - api/router/testing\n - api/router/testing/SpyNgModuleFactoryLoader#description\n - api/router/testing/SpyNgModuleFactoryLoader#load\n - api/router/testing/SpyNgModuleFactoryLoader#methods\n - api/router/testing/SpyNgModuleFactoryLoader#properties\n - api/router/testing/SpyNgModuleFactoryLoader#spyngmodulefactoryloader\n - api/router/testing/SpyNgModuleFactoryLoader#stubbedModules\n - https://github.com/angular/angular/edit/master/packages/router/testing/src/router_testing_module.ts?message=docs(router)%3A%20describe%20your%20change...#L13-L79\n - https://github.com/angular/angular/edit/master/packages/router/testing/src/router_testing_module.ts?message=docs(router)%3A%20describe%20your%20change...#L71-L78\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/testing/src/router_testing_module.ts#L13-L79\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/router/testing/src/router_testing_module.ts#L71-L78\n-->"
|
|
} |