twerske e4df94214b docs: add guides for the top 10 errors (#40060)
add top 10 error guides
provide description and debugging for top errors

PR Close #40060
2021-01-14 11:28:52 -08:00

26 lines
1015 B
Markdown
Raw 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.

@name Export Not Found
@category runtime
@shortDescription Export not found!
@description
Angular cant find a directive with `{{ PLACEHOLDER }}` export name. The export name is specified in the `exportAs` property of the directive decorator. This is common when using FormsModule or Material modules in templates, and youve forgotten to [import the corresponding modules](https://angular.io/guide/sharing-ngmodules).
@debugging
Use the export name to trace the templates or modules using this export.
Ensure that all dependencies are [properly imported and declared in your NgModules](https://angular.io/guide/sharing-ngmodules). For example, if the export not found is `ngForm`, we need to import `FormsModule` and declare it in the list of imports in `*.module.ts` to resolve the error.
```typescript
import { FormsModule } from '@angular/forms';
@NgModule({
...
imports: [
FormsModule,
```
If you recently added an import, you may need to restart your server to see these changes.