This is a simple web application which contains three entities; customers, products and orders. It uses the angular/in-memory-web-api
library (see https://github.com/angular/in-memory-web-api) to mimic a database and api.
The following files are contained in the data
folder
customer.ts
,order.ts
andproduct.ts
contain the types and dummy data for each entity.app-data.ts
the setup for theangular/in-memory-web-api
api.service.ts
an Angular service which uses theHttpClient
to retrieve data from the mock apis/
-
Display a list of orders in a table in the
app.component.ts
file, with the following headers- Order Id
- Customer Name
- Order Date (formatted as
dd/MM/yyyy
) - Product Name
-
Implement a select to filter orders by customer name. The select should
- Should contain options for each of the customer names as well as an empty option.
- The empty option should be initially selected.
- When the empty option is selected all orders should be shown.
- When a customer name option is selected the orders should be filtered by customer name
-
Change the
app.component.ts
change detection strategy toChangeDetectionStrategy.OnPush
. If you have done the previous tasks correctly the application should still work.
You will be assessed on your use of RxJs (hint: your code shouldn't use the subscribe method, use the async pipe), how you structure your code, your use of types and general best practices. You don't need to worry about the styling of the application. The test should take around an hour.