This project was generated with Angular CLI version 13.2.2.
- Ensure you have node 16.x installed on your computer
- Using your favorite terminal navigate to the project's root folder and run
npm install
Run ng serve
for a dev server if you have the Angular CLI installed else run npm run start
. 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 or npm run build
. The build artifacts will be stored in the dist/
directory.
Run ng test
, or npm run test
to execute the unit tests via Karma.
I tried to keep things simple, there are things I would have done differently for production code depending on requirements. Things such as creating a responsive layout with an actual theme, fonts, and updated design. I did start to add paging but decided that was overkill and instead just loaded all results at once. My unit tests do not cover everything, I just added a few for examples.
- You'll notice I had to manually convert the values to numbers in my calculateTotal method, this is because for whatever reason (I am not positive) Angular was changing the values to strings leaving you with a long string of numbers, not the sum.
- There are places I would break up the component, normally I place results in a display component, and leave the main page as an orchestrator and/or route.
- The error page is extremely basic and could be done a better, but I believe it works and is easily refactored to look prettier.
- My commits are not that organized, but I find that commit messages don't do much in the long run as they are normally quashed when merging the feature branch back into the main.
- I am aware that I am using a deprecated method with
expect().toBeObservable()
but I am running short on time to look up the new way of testing observables. - I would also have converted the project to use Jest over Jasmine if I had time