PS D:\work\sources\formio\angular-demo> ng serve
Your global Angular CLI version (8.3.5) is greater than your local
version (8.3.3). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
10% building 4/4 modules 0 activei 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
i 「wds」: webpack output is served from /
i 「wds」: 404s will fallback to //index.html
chunk {auth-auth-module} auth-auth-module.js, auth-auth-module.js.map (auth-auth-module) 14.5 kB [rendered]
chunk {event-event-module} event-event-module.js, event-event-module.js.map (event-event-module) 15.4 kB [rendered]
chunk {form-form-module} form-form-module.js, form-form-module.js.map (form-form-module) 252 kB [rendered]
chunk {forms-forms-module} forms-forms-module.js, forms-forms-module.js.map (forms-forms-module) 104 kB [rendered]
chunk {main} main.js, main.js.map (main) 278 kB [initial] [rendered]
chunk {participant-participant-module} participant-participant-module.js, participant-participant-module.js.map (participant-participant-module) 3.7 kB [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 287 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 607 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 9.19 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 380 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.02 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 10.9 MB [initial] [rendered]
Date: 2019-09-23T11:01:52.021Z - Hash: bea2db4e6da4ec84ea6d - Time: 33202ms
ERROR in ./src/app/components/CheckMatrix.js 34:21
Module parse failed: Unexpected token (34:21)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }
|
> static builderInfo = {
| title: 'Check Matrix',
| group: 'basic',
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Failed to compile.
Additional details
Application runs fine when import './components/CheckMatrix'; from app.module.ts
is commented.
I have been trying to integrate form builder in my angular 12 application.
I did following things
import { FormioModule } from 'angular-formio'; -> added to app.module.ts
In my html
<form-builder [form]="form" (change)="onChange($event)">
And corresponding ts file is :-
import { Component, OnInit } from '@angular/core';
import { ElementRef, ViewChild } from '@angular/core';
@component({
selector: 'app-submission',
templateUrl: './submission.component.html',
styleUrls: ['./submission.component.scss']
})
export class SubmissionComponent implements OnInit {
ngOnInit(): void {
throw new Error('Method not implemented.');
}
@ViewChild('json') jsonElement?: ElementRef;
public form: Object = {
components: []
};
onChange(event:any) {
console.log(event);
//this.jsonElement.nativeElement.innerHTML = '';
//this.jsonElement.nativeElement.appendChild(document.createTextNode(JSON.stringify(event.form, null, 4)));
}
}
Error received:-
Error: src/app/submission/submission.component.html:1:30 - error TS2532: Object is possibly 'undefined'.
1 <form-builder [form]="form" (change)="onChange($event)">
~~~~~~
src/app/submission/submission.component.ts:6:16
6 templateUrl: './submission.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component SubmissionComponent.
observation:-
error in the change event.
Also after removing change it works fine but i need it. Pls reply if i am missing anything