Web Programming for Apps and Services

Schedule Notes Resources MyApps Instructions Graded Work Code examples

BTI425 Week 8 Notes

The theme for this week is to work with Angular services. A service can provide functionality - service - to one or more components. We will explore how we can create services using the Angular CLI as well as how to include them in our Components using DI (Dependency Injection).

As we have seen in BTI325, a typical use-case for services is to provide an abstract interface that we can use to fetch json data from a Web API. This week, we will introduce Angular’s HttpClient Module and how we can use it to create “Observable” service methods that can be used across all Components within our apps.

Lastly, we will expand upon our Angular Routing techniques and add the notion of Route Parameters (ie: /product/3 and /product-list?page=2)