Skip to content

Commit bccb1f1

Browse files
Merge pull request #18 from christophercr/bugfix/demo-aot-build
fix(build): adapt module forRoot() and remove index.ts barrels from the library to fix AOT compilation
2 parents cb3b3f8 + da73268 commit bccb1f1

File tree

12 files changed

+581
-270
lines changed

12 files changed

+581
-270
lines changed

demo-app/package-lock.json

Lines changed: 322 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo-app/src/app/app.module.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { BrowserModule, DomSanitizer } from "@angular/platform-browser";
22
import { NgModule } from "@angular/core";
33
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
44
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
5+
import { HttpClientModule } from "@angular/common/http";
56
import { TranslateModule, TranslateService } from "@ngx-translate/core";
67
import { MatButtonModule } from "@angular/material/button";
78
import { MatButtonToggleModule } from "@angular/material/button-toggle";
@@ -17,11 +18,14 @@ import { NgxFormErrorsMessageService, NgxFormErrorsModule } from "@nationalbankb
1718
import { AppComponent } from "./app.component";
1819
import { initializeTranslation } from "./translation.config";
1920
import { AppRoutingModule } from "./app-routing.module";
20-
import { LanguageSelectorComponent, SimpleFormErrorComponent, TranslatedFormErrorComponent } from "./components";
21+
import {
22+
CardComponent,
23+
LanguageSelectorComponent,
24+
NavigationComponent,
25+
SimpleFormErrorComponent,
26+
TranslatedFormErrorComponent
27+
} from "./components";
2128
import { NgxFormsExampleComponent, ReactiveFormsExampleComponent, TemplateDrivenFormsExampleComponent } from "./pages";
22-
import { NavigationComponent } from "./components/navigation/navigation.component";
23-
import { CardComponent } from "./components/card/card.component";
24-
import { HttpClientModule } from "@angular/common/http";
2529

2630
/* tslint:disable:no-hardcoded-credentials */
2731
@NgModule({

demo-app/src/app/pages/ngx-forms-example/ngx-forms-example.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export class NgxFormsExampleComponent implements OnInit {
5353
}
5454

5555
public onSubmitUserDetails(formGroup: FormGroup): void {
56-
console.log("CCR==========> onSubmitUserDetails value", formGroup.value);
56+
console.log("Submitted form:", formGroup.value);
5757
}
5858

5959
public getFormStatus(): void {
60-
console.log("CCR==========> form status", this.formGroup);
60+
console.log("Form status", this.formGroup);
6161
}
6262
}

demo-app/src/app/pages/reactive-forms-example/reactive-forms-example.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export class ReactiveFormsExampleComponent implements OnInit {
2121
public constructor(private formBuilder: FormBuilder) {}
2222

2323
public ngOnInit(): void {
24-
// user details form validations
2524
this.formGroup = this.formBuilder.group({
2625
username: [undefined, Validators.required],
2726
matchingPasswords: new FormGroup(
@@ -86,10 +85,10 @@ export class ReactiveFormsExampleComponent implements OnInit {
8685
}
8786

8887
public onSubmitUserDetails(formGroup: FormGroup): void {
89-
console.log("CCR==========> onSubmitUserDetails value", formGroup.value);
88+
console.log("Submitted form:", formGroup.value);
9089
}
9190

9291
public getFormStatus(): void {
93-
console.log("CCR==========> form status", this.formGroup);
92+
console.log("Form status", this.formGroup);
9493
}
9594
}

demo-app/src/app/pages/template-driven-forms-example/template-driven-forms-example.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ export class TemplateDrivenFormsExampleComponent implements OnInit {
6565
}
6666

6767
public onSubmitUserDetails(ngForm: NgForm): void {
68-
console.log("CCR==========> onSubmitUserDetails value", ngForm.value);
68+
console.log("Submitted form:", ngForm.value);
6969
}
7070

7171
public getFormStatus(ngForm: NgForm): void {
72-
console.log("CCR==========> form status", ngForm);
72+
console.log("Form status", ngForm);
7373
}
7474
}

0 commit comments

Comments
 (0)