Software⏱️ 2 min read📅 2026-06-03

How to Fix: CUSTOM_ELEMENTS_SCHEMA added to NgModule.schemas still showing Error

Learn how to fix: CUSTOM_ELEMENTS_SCHEMA added to NgModule.schemas still showing Error.

Quick Answer: Try checking your system settings or restarting.

The error 'cl-header' is not a known element

🛑 Root Causes of the Error

  • Angular 2 rc6 has changed its schema, and custom elements are not automatically registered.

✅ Best Solutions to Fix It

Adding CUSTOM_ELEMENTS_SCHEMA to NgModule.schemas

  1. Step 1: Import the CUSTOM_ELEMENTS_SCHEMA in your main application module (AppModule).
  2. Step 2: Add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of your main application module.
  3. Step 3: This will register custom elements and prevent the error from occurring.

Using Web Components with Angular

  1. Step 1: Check if you are using Web Components in your project.
  2. Step 2: If yes, then ensure that they are correctly registered with the Angular framework.

💡 Conclusion

To resolve the issue, add CUSTOM_ELEMENTS_SCHEMA to NgModule.schemas in your main application module. This will register custom elements and prevent the error from occurring.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions