Angular project that implements a prime number generator which returns anlist of all prime numbers in a given range (inclusive of the endpoints).
Live Demo: https://xyljames.github.io/AngularPrimeNumberGenerator/
Enter a starting and ending number to generate all the prime number within this range. Enter: 2-5(same with 5-2), output: 2,3,5. To click generated item to delete it from list.
src/app/about: about page componenet to state the problem requirements. src/app/generator: main generator component folder which has main HTML5 page, test cases and generator component. src/app/generator/models: folder has interface PrimeNumberGenerator, UpdPrimeNumGenerator class and its own componenet test file. src/app/: main app module with configured routing.
Run npm install
to install node_modules.
If still have troubles to start, delete package-lock.json and node_modules folder then run npm install agian.
Typescript:Version 2.9.2. Jasmine v3.3.1. Jasmine-core v3.3.0.
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.(make sure you are in RIGHT floder:primeNumberGenerator)
The current test coverage: 100% Statements, 100% Branches, 100% Functions, 100% Lines.
Run ng test
to execute the unit tests via Karma.
Run ng test --code-coverage
to generate test report.
Range 7900 and 7920 test case => done
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.