5 lines
3.2 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"id": "errors/NG8003",
"title": "NG8003: No directive found with export",
"contents": "<h1 id=\"ng8003-no-directive-found-with-export\">NG8003: No directive found with export<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"errors/NG8003#ng8003-no-directive-found-with-export\"><i class=\"material-icons\">link</i></a></h1>\n<div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/aio/content/errors/NG8003.md?message=docs(...)%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n</div>\n\n\n<div class=\"error-video-container\">\n <iframe src=\"https://www.youtube.com/embed/fUSAg4kp2WQ\" frameborder=\"0\" allow=\"accelerometer; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n</div>\n\n\n\n<div class=\"content\">\n <h2 id=\"description\">Description<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"errors/NG8003#description\"><i class=\"material-icons\">link</i></a></h2>\n <p>Angular cant find a directive with <code>{{ PLACEHOLDER }}</code> export name. This is common with a missing import or a missing <a href=\"api/core/Directive#exportAs\"><code>exportAs</code></a> on a directive.</p>\n<div class=\"alert is-helpful\">\n<p>This is the compiler equivalent of a common runtime error <a href=\"errors/NG0301\">NG0301: Export Not Found</a>.</p>\n</div>\n\n</div>\n<br>\n<div class=\"debugging\">\n <h2 id=\"debugging-the-error\">Debugging the error<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"errors/NG8003#debugging-the-error\"><i class=\"material-icons\">link</i></a></h2>\n <p>Use the string name of the export not found to trace the templates or modules using this export.</p>\n<p>Ensure that all dependencies are properly imported and declared in our Modules. For example, if the export not found is <code><a href=\"api/forms/NgForm\" class=\"code-anchor\">ngForm</a></code>, we will need to import <code><a href=\"api/forms/FormsModule\" class=\"code-anchor\">FormsModule</a></code> and declare it in our list of imports in <code>*.module.ts</code> to resolve the missing export error.</p>\n<code-example language=\"typescript\">\nimport { <a href=\"api/forms/FormsModule\" class=\"code-anchor\">FormsModule</a> } from '@angular/forms';\n\n@<a href=\"api/core/NgModule\" class=\"code-anchor\">NgModule</a>({\n ...\n imports: [\n <a href=\"api/forms/FormsModule\" class=\"code-anchor\">FormsModule</a>,\n …\n</code-example>\n<p>If you recently added an import, you will need to restart your server to see these changes.</p>\n\n</div>\n\n<!-- links to this doc:\n - errors\n - errors/NG0301\n-->\n<!-- links from this doc:\n - api/core/Directive#exportAs\n - api/core/NgModule\n - api/forms/FormsModule\n - api/forms/NgForm\n - errors/NG0301\n - errors/NG8003#debugging-the-error\n - errors/NG8003#description\n - errors/NG8003#ng8003-no-directive-found-with-export\n - https://github.com/angular/angular/edit/master/aio/content/errors/NG8003.md?message=docs(...)%3A%20describe%20your%20change...\n-->"
}