https://github.com/andrewjbateman/angular-engineering-calculator
:clipboard: Angular app to create a calculator then add engineering functions
https://github.com/andrewjbateman/angular-engineering-calculator
angular angular15 calculator css3 html5 tutorial-code
Last synced: 5 months ago
JSON representation
:clipboard: Angular app to create a calculator then add engineering functions
- Host: GitHub
- URL: https://github.com/andrewjbateman/angular-engineering-calculator
- Owner: AndrewJBateman
- License: mit
- Created: 2020-03-06T09:19:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-03T05:16:48.000Z (about 3 years ago)
- Last Synced: 2024-12-27T02:45:25.339Z (over 1 year ago)
- Topics: angular, angular15, calculator, css3, html5, tutorial-code
- Language: TypeScript
- Homepage: https://AndrewJBateman.github.io/angular-engineering-calculator/
- Size: 2.47 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :zap: Angular Engineering Calculator
* App to do simple arithmetic calculations.
* Tutorial code from [Ahmed Bouchefra, TechieDiaries: Angular 9 Tutorial and Example: Build your First Angular App](https://www.techiediaries.com/angular/angular-9-tutorial-and-example/) to be expanded into a more complex calculator with Engineering functions.
* **Note:** to open web links in a new window use: _ctrl+click on link_




## :page_facing_up: Table of contents
* [:zap: Angular Engineering Calculator](#zap-angular-engineering-calculator)
* [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)
* [:books: General info](#books-general-info)
* [:camera: Screenshots](#camera-screenshots)
* [:signal_strength: Technologies](#signal_strength-technologies)
* [:floppy_disk: Setup](#floppy_disk-setup)
* [:computer: Code Examples](#computer-code-examples)
* [:cool: Features](#cool-features)
* [:clipboard: Status & To-Do List](#clipboard-status--to-do-list)
* [:clap: Inspiration](#clap-inspiration)
* [:file_folder: License](#file_folder-license)
* [:envelope: Contact](#envelope-contact)
## :books: General info
* Calculator created in HTML and CSS, using html from a [jsfiddle by Ayo Isaiah](http://jsfiddle.net/ayoisaiah/c8b9zsaq/)
## :camera: Screenshots

## :signal_strength: Technologies
* [Angular v15](https://angular.io/)
## :floppy_disk: Setup
* Install dependencies using `npm i`
* Run `ng serve` to get a server at `http://localhost:4200/`
* Run `npm run build` to build the project. The build artifacts will be stored in the `docs` directory.
## :computer: Code Examples
* Switch statement used to return the result of different operations depending on the operand used
```typescript
private doCalculation(op: any, secondOp: any) {
switch (op) {
case '+':
return this.firstOperand += secondOp;
case '-':
return this.firstOperand -= secondOp;
case '*':
return this.firstOperand *= secondOp;
case '/':
return this.firstOperand /= secondOp;
case '=':
return secondOp;
}
}
```
## :cool: Features
* Angular event binding used to bind the `getNumber()` method to the button `(click)` DOM event
## :clipboard: Status & To-Do List
* Status: Working.
* To-Do: Add engineering functions
## :clap: Inspiration
* [Ahmed Bouchefra, TechieDiaries: Angular 9 Tutorial and Example: Build your First Angular App](https://www.techiediaries.com/angular/angular-9-tutorial-and-example/),
## :file_folder: License
* This project is licensed under the terms of the MIT license.
## :envelope: Contact
* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com