This is an exercise web app project to simulate a calculator. It is generated with Angular CLI.
Here is a preview page of the calculator app.
- Use available number keypads (0~9) to enter number inputs
- Use decimal keypad (.) for numbers with floating points
- Use negate/minus keypad (-) for negative numbers
- Use operation keypads (+) (-) (*) (/) for basic operations
- Use equal keypad (=) for calculation results
- Calculating on an expression ending with an operation entry, e.g. '1 + ', results in 'BAD EXPRESSION'
- Use all cancel keypad (AC) to clear out calculation expression or result
Following basic keyboard keys are supported:
- Number keys
- Negate sign and decimal point keys
- Numeric keypad (numpad) keys
- EQUAL, ENTER keys for calculating result
- ESCAPE, BACKSPACE keys for clearing up calculation expression or result
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.