Recommendations Service

Let's add a service to get restaurant recommendations and write its tests.

At this point, we’re ready to add the final feature to our event view page, which displays a list of restaurant recommendations to the user. This list of recommendations will only be displayed if the event creator sets the “Suggest Locations” radio button to “Yes.” If they select “No,” the view for this feature will be hidden.

Recommendations service

Start by generating a new service for restaurant recommendations.

ng g service services/recommendations/recommendations

From there, we’ll create a new testing directory and a file within it.

mkdir src/app/testing
touch src/app/testing/recommendations-result.json

Get hands-on with 1400+ tech skills courses.