I have a property that looks like this in a Child class:
formModel = {
motive: 0,
coop: 0,
leadership: 0,
teamwork: 0,
community: 0,
professional: 0,
role_model: 0,
supportive: 0,
problem_solving: 0
};
But in other child classes, this property is different.
formModel = {
motive: 0,
coop: 0,
leadership: 0,
teamwork: 0,
community: 0,
professional: 0,
communication: 0,
respect: 0,
morale: 0,
role_model: 0,
supp_enviro: 0
};
The order of the attributes changes and the names change too.
I want to declare an abstract version of this property in its Parent class. Is this possible? I'm having no such luck with public abstract formModel: Object; in the parent.
Edit:
Here is the error I'm getting:
vendor.bundle.js:40839 Uncaught Error: Unexpected value 'undefined' declared by the module 'AppModule'
at syntaxError (vendor.bundle.js:40839)
at vendor.bundle.js:54719
at Array.forEach (<anonymous>)
at CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getNgModuleMetadata (vendor.bundle.js:54717)
at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._loadModules (vendor.bundle.js:66103)
at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (vendor.bundle.js:66076)
at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (vendor.bundle.js:66005)
at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_._bootstrapModuleWithZone (vendor.bundle.js:71695)
at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_.bootstrapModule (vendor.bundle.js:71681)
at Object.../../../../../src/main.ts (main.bundle.js:1339)
I noticed that I only get this error if I add the following method to my parent class, instead of the child class:
public handleRadioButtonChanges(event: Event): void {
console.log("test");
}