Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
NO_ERRORS_SCHEMA tells Angular to accept any property on any element in a template, suppressing errors for unknown elements and properties. That broad allowance can hide misspellings and other template mistakes, so Angular generally discourages using it as a quick fix. For a custom web component, CUSTOM_ELEMENTS_SCHEMA may be a better fit; for a binding type error, investigate template type checking instead.
What does NO_ERRORS_SCHEMA do?
Angular checks template elements and property bindings against what is known in the component’s compilation context. A schema changes which otherwise-unrecognized elements or properties Angular accepts. The NO_ERRORS_SCHEMA API defines a schema that allows any property on any element. In practice, it suppresses template errors about unknown elements and unknown properties.
This can make a template compile when it contains elements or properties Angular does not recognize, but it also weakens validation. A typo in an element name or binding may no longer be caught as an unknown-element or unknown-property error. Angular says use of this schema is generally discouraged because it prevents useful validation and may hide real template errors.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsChoose a fix based on the error
Unknown element or property from a web component
If the template uses a custom web component such as <my-widget> with dash-case properties, consider CUSTOM_ELEMENTS_SCHEMA. Angular documents this narrower schema for non-Angular elements named in dash case and dash-case element properties. It is not a blanket allowance for arbitrary unknown elements and properties. The advanced configuration guide shows schema configuration for this custom-elements case.
#1 Best Overall
Unknown Angular component or directive
If the element is meant to be an Angular component or directive, check that it is available in the relevant compilation context rather than suppressing the error. A schema can make the diagnostic disappear without making the missing Angular declaration available to the template.
Binding type error
A type-checking complaint is different from an unknown-element or unknown-property error. Consult Angular’s template type-checking guidance to identify the specific expression or strictness check involved. For some false positives, Angular documents narrower options, including casting one expression with $any() or adjusting individual strictness flags. These approaches preserve more template checking than broadly allowing unknown elements and properties.
Rank #2
Where to configure a schema
Put the schema where the component is configured. Angular documents schemas for NgModules and, separately, for standalone components. The NgModule API lists NO_ERRORS_SCHEMA and CUSTOM_ELEMENTS_SCHEMA as allowed module schema values. The Component API documents a schemas property for standalone components and notes that this property is available only for standalone components.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated 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 matchFor example, in a standalone component, schema metadata is supplied in the component decorator:
Rank #3
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@Component({
selector: 'app-host',
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: '<my-widget></my-widget>'
})
export class HostComponent {}
Use CUSTOM_ELEMENTS_SCHEMA in this example only when the template’s custom element and properties fit its documented scope. For an NgModule-based component, configure the schema in that module’s metadata instead. Check the API documentation for the Angular version and project structure in use.
What NO_ERRORS_SCHEMA does not mean
The schema is a template-acceptance rule for unknown elements and properties; it is not a general repair for every Angular compiler error. Nor does its documented purpose establish that Angular sanitization is disabled. Angular treats sanitization and template security separately in its security guidance. Diagnose the actual error before changing schemas.
Quick Recap
Rank #4
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.

