Skip to content

Commit da50f64

Browse files
committed
Add CUSTOM_ELEMENTS_SCHEMA to every lazy loaded module
Since we are using differential loading + AOT, we need to add CUSTOM_ELEMENTS_SCHEMA to every lazily loaded module
1 parent 693ac0a commit da50f64

File tree

10 files changed

+20
-10
lines changed

10 files changed

+20
-10
lines changed

src/app/app.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { HttpClientModule } from '@angular/common/http';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { BrowserModule } from '@angular/platform-browser';
44
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
55
import {
@@ -43,6 +43,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
4343
};
4444

4545
@NgModule({
46+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
4647
imports: [
4748
BrowserModule,
4849
BrowserAnimationsModule,

src/app/homepage/pages/cli/cli.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from './../../../shared/shared.module';
55
import { CliLibrariesComponent } from './libraries/libaries.component';
@@ -51,6 +51,7 @@ const routes: Routes = [
5151
];
5252

5353
@NgModule({
54+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
5455
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
5556
declarations: [
5657
CliOverviewComponent,

src/app/homepage/pages/faq/faq.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from '../../../shared/shared.module';
55
import { GlobalPrefixComponent } from './global-prefix/global-prefix.component';
@@ -37,6 +37,7 @@ const routes: Routes = [
3737
];
3838

3939
@NgModule({
40+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
4041
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
4142
declarations: [
4243
GlobalPrefixComponent,

src/app/homepage/pages/fundamentals/fundamentals.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from '../../../shared/shared.module';
55
import { AsyncComponentsComponent } from './async-components/async-components.component';
@@ -83,6 +83,7 @@ const routes: Routes = [
8383
];
8484

8585
@NgModule({
86+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
8687
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
8788
declarations: [
8889
AsyncComponentsComponent,

src/app/homepage/pages/graphql/graphql.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from '../../../shared/shared.module';
55
import { CliPluginComponent } from './cli-plugin/cli-plugin.component';
@@ -105,6 +105,7 @@ const routes: Routes = [
105105
];
106106

107107
@NgModule({
108+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
108109
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
109110
declarations: [
110111
QuickStartComponent,

src/app/homepage/pages/microservices/microservices.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from '../../../shared/shared.module';
55
import { BasicsComponent } from './basics/basics.component';
@@ -79,6 +79,7 @@ const routes: Routes = [
7979
];
8080

8181
@NgModule({
82+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
8283
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
8384
declarations: [
8485
BasicsComponent,

src/app/homepage/pages/recipes/recipes.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from '../../../shared/shared.module';
55
import { CqrsComponent } from './cqrs/cqrs.component';
@@ -76,6 +76,7 @@ const routes: Routes = [
7676
];
7777

7878
@NgModule({
79+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
7980
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
8081
declarations: [
8182
SqlTypeormComponent,

src/app/homepage/pages/techniques/techniques.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from '../../../shared/shared.module';
55
import { AuthenticationComponent } from './authentication/authentication.component';
@@ -111,6 +111,7 @@ const routes: Routes = [
111111
];
112112

113113
@NgModule({
114+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
114115
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
115116
declarations: [
116117
SqlComponent,

src/app/homepage/pages/websockets/websockets.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44
import { SharedModule } from '../../../shared/shared.module';
55
import { AdapterComponent } from './adapter/adapter.component';
@@ -43,6 +43,7 @@ const routes: Routes = [
4343
];
4444

4545
@NgModule({
46+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
4647
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
4748
declarations: [
4849
GatewaysComponent,

src/app/shared/shared.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
33
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
44
import { BannerCoursesComponent } from './components/banner-courses/banner-courses.component';
55
import { BannerEnterpriseComponent } from './components/banner-enterprise/banner-enterprise.component';
@@ -9,6 +9,7 @@ import { HeaderAnchorDirective } from './directives/header-anchor.directive';
99
import { ExtensionPipe } from './pipes/extension.pipe';
1010

1111
@NgModule({
12+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
1213
imports: [CommonModule, PerfectScrollbarModule],
1314
declarations: [
1415
ExtensionPipe,

0 commit comments

Comments
 (0)