PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchNO_ERRORS_SCHEMA tells Angular to accept any property on any element in a template, including elements and properties Angular does not otherwise recognize. That can quiet unknown-element or unknown-property errors, but it also weakens template validation and can conceal mistakes. For a custom web component, CUSTOM_ELEMENTS_SCHEMA is usually the narrower option to evaluate; for a binding type error, use Angular’s template type-checking guidance instead.
What does NO_ERRORS_SCHEMA do?
NO_ERRORS_SCHEMA is a schema constant exported by @angular/core. Angular defines it as a schema that “allows any property on any element.” In practice, it suppresses template errors about elements or properties that Angular does not recognize in the relevant compilation context. See the Angular NO_ERRORS_SCHEMA API reference.
As an Amazon Associate I earn from qualifying purchases.
A schema changes what Angular accepts during template validation; it does not add a component, directive, or property implementation to your application. If a component is missing from the compilation context, or a property name is misspelled, the schema may make the template compile without fixing the underlying issue.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsShould you use it to fix an unknown element or property?
Usually, first identify why Angular does not recognize the template element or binding. Check that the component or directive is declared or imported in the context that owns the template, and verify the element and property names. Angular generally discourages NO_ERRORS_SCHEMA because it prevents useful validation and may hide real template errors.
#1 Best Overall
- Use it only when broad acceptance of otherwise-unrecognized elements and properties is intentional.
- Do not apply it as a catch-all for unrelated compiler errors; it addresses unknown elements and properties, not every template problem.
- Prefer a narrower solution when the template contains a web component or when the complaint is about a binding’s type.
NO_ERRORS_SCHEMA vs. CUSTOM_ELEMENTS_SCHEMA
Choose based on what the template contains and what Angular is reporting. Angular documents the schemas’ scopes as follows:
| Schema | Documented scope | When to consider it |
|---|---|---|
NO_ERRORS_SCHEMA |
Allows any property on any element. | Only when broad acceptance of unknown elements and properties is deliberate, with the loss of validation understood. |
CUSTOM_ELEMENTS_SCHEMA |
Allows non-Angular elements named in dash case and dash-case element properties. | When the template uses custom elements such as <my-widget> and properties within that documented scope. |
CUSTOM_ELEMENTS_SCHEMA is not a general allowance for every unknown element or arbitrary property. Check Angular’s CUSTOM_ELEMENTS_SCHEMA API reference and advanced configuration guide against the names and bindings in your template.
Rank #2
Where do you configure the schema?
Put the schema where Angular configures the component or module that owns the template. The exact location depends on your application’s structure:
- Standalone component: add a
schemasproperty to that component’s decorator metadata. Angular’s Component API documents this property for standalone components. - NgModule-based application: add the schema to the relevant module’s
schemasmetadata. The NgModule API listsNO_ERRORS_SCHEMAandCUSTOM_ELEMENTS_SCHEMAas accepted schema values.
Use the configuration style supported by your Angular version and component organization. Avoid adding a broad schema at a higher level simply to silence errors across unrelated templates.
Rank #3
What if the error is about a binding’s type?
A binding type error is different from an unknown-element or unknown-property error. A schema is not the right first response to a type mismatch. Consult Angular’s template type-checking guide to understand the diagnostic and the strictness setting involved.
For a specific expression that is a known false positive, Angular documents narrower options, including casting that expression with $any() or adjusting an individual strictness flag. These approaches preserve more template checking than allowing any property on any element.
Rank #4
Does NO_ERRORS_SCHEMA disable Angular security protections?
The cited API defines NO_ERRORS_SCHEMA as a template schema for accepting elements and properties Angular does not recognize. It does not establish that the schema disables Angular sanitization or directly creates an XSS vulnerability. Template schema validation and Angular’s handling of trusted values and sanitization are separate concerns; see the Angular security guide for the latter.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




