c# 4.0 - TypeError: this.country.toJS is not a function Angular 2 -


i new angular 2, have following code:-

data["country"] = this.country ? this.country.tojs() : null; tojs(data?: any) {         data = data === undefined ? {} : data;         data["code"] = this.code !== undefined ? this.code : null;         data["name"] = this.name !== undefined ? this.name : null;         data["currency"] = this.currency ? this.currency.tojs() : null;         data["twolettercode"] = this.twolettercode !== undefined ?         this.twolettercode : null;         data["threelettercode"] = this.threelettercode !== undefined ?          this.threelettercode : null;         data["numericcode"] = this.numericcode !== undefined ? this.numericcode           : null;         super.tojs(data);         return data;     } 

i getting following error

[typeerror: this.country.tojs not function]

what doing wrong?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -