Angular TypeScript, expecting string but get '[object Object]' -
here part of class:
export class token { constructor( private type: string, private encoded: string) { ... ... } ... ... tostring(): string { return this.type; } }
call this:
... ... let str: string = token.tostring();
check value it's
[object object]
expecting string passed constructor.
Comments
Post a Comment