Install angular cli: npm install -g @angular/cli
To run the demo use npm install
and ng serve
.
Navigate to http://localhost:4200/
- CSS should be made with a CSS precompiler: the project uses SASS
- You can use all third party JS libraries
- All HTML/SCSS/CSS and JS, needs to be custom made... i.e. by you
- Use 'Helvetica Neue', Arial, Helvetica, sans-serif; for the font stack: the custom font-family is defined in style.sass and it is used in all of the demo
The project is organized by features (as suggested in the best practices section of Angular documentation)
- reviews-widget: this is the main component. It calls the review service to retrieve the data and instantiates the review-details components
- review-detail: it represents a review
- start-rating: it renders the stars of a review. As it is used multiple times in the demo, it's located in the shared folder
review.service: retrieves the data from the review.json file. The reviews are chosen at random using Durstenfeld shuffle algorithm as its running time is O(n)
review: it represents a review
style.sass: here I defined a custom color palette. The colors are inspired from the trustpilot logo and from the Material Design practices