chat21-ionic
chat21-ionic copied to clipboard
Can't get it working on my Mac
Hi, I run the app and it open the first window. but when I try to register the first user, I get the following error. I have provided system information for more clarity on the issue.
System information
Ionic Framework: 3.9.2 Ionic App Scripts: 3.1.10 Angular Core: 5.2.11 Angular Compiler CLI: 5.2.11 Node: 9.4.0 OS Platform: macOS High Sierra Navigator Platform: MacIntel User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36
Error
Runtime Error Cannot read property 'firstname' of undefined
TypeError: Cannot read property 'firstname' of undefined
at RegisterPage.webpackJsonp.329.RegisterPage.elementChanged (http://localhost:8100/build/main.js:3468:40)
at Object.eval [as handleEvent] (ng:///AppModule/RegisterPage.ngfactory.js:144:31)
at handleEvent (http://localhost:8100/build/vendor.js:13963:155)
at callWithDebugContext (http://localhost:8100/build/vendor.js:15472:42)
at Object.debugHandleEvent [as handleEvent] (http://localhost:8100/build/vendor.js:15059:12)
at dispatchEvent (http://localhost:8100/build/vendor.js:10378:25)
at http://localhost:8100/build/vendor.js:11003:38
at HTMLElement.
I solve this error in this way:
register.ts
elementChanged(input){ //let field = input.inputControl.firstname; // this[field + "Changed"] = true; }
Instead of commenting on the above code, you can change it to
let field = input.ngControl.name