Skip to content

Instantly share code, notes, and snippets.

@debugmodedotnet
Created March 30, 2018 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debugmodedotnet/9ebd225967337852c2c97f1c465bde06 to your computer and use it in GitHub Desktop.
Save debugmodedotnet/9ebd225967337852c2c97f1c465bde06 to your computer and use it in GitHub Desktop.
export class AppComponent {
title = 'Calculator App';
num1: number;
num2: number;
result: number;
add() {
this.result = this.num1 + this.num2;
}
substract() {
this.result = this.num1 - this.num2;
}
multiply() {
this.result = this.num1 * this.num2;
}
divide() {
this.result = this.num1 % this.num2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment