
Angular Cookbook
By :

In this recipe, you'll start with an app with a parent component and a child component. You'll then use an Angular service to establish communication between them. We're going to use BehaviorSubject
and Observable streams to communicate between components and the service.
The project for this recipe resides in chapter01/start_here/cc-services
:
npm install
to install the dependencies of the project. ng serve -o
. This should open the app in a new browser tab and you should see the app as follows:
Figure 1.3 – The cc-services app running on http://localhost:4200
Similar to the previous recipe, we have an app with AppComponent
, NotificationsButtonComponent
, and NotificationsManagerComponent
. AppComponent
is the parent of the other two components mentioned...