Typescript Angular Phonegap Calculator