concept action in category angular

This is an excerpt from Manning's book Angular Development with Typescript, Second Edition.
Open the bindings project in your IDE and run the npm i command in its Terminal window. After dependencies are installed, run the preceding command to see the one-way sample app in action. It’ll render the page as shown in figure 2.3.
An action is a JavaScript object that has a type property describing what happens in your app, such as a user wants to buy IBM stock. Besides the type property, an action object can optionally have another property with a payload of data that should change the app state in some fashion. An example is shown in the following listing.
If a component dispatches an action that requires communication with external resources, the action can be picked up by the Effects object, which will handle this action and dispatch another one on the reducer. For example, an effect can receive a LOAD_PRODUCTS action from the store, invoke loadProducts(), and, when the data is loaded, dispatch either of the LOAD_PRODUCTS_SUCCESS or LOAD_PRODUCTS_FAILURE actions. The reducer will pick it up and update state accordingly. Figure 15.4 shows the ngrx flow that uses effects.
To understand this diagram, imagine that a user clicks the Buy 100 button. The component would dispatch an action on the store, which can be handled by a reducer, an effect, or both. An effect can access external services and dispatch another action. In any case, a reducer is ultimately responsible for creating a new state, and a component can get it using a selector and update the UI accordingly (such as by rendering the message “Buying 100 shares”).
Note that an action is an object (for example, {type: INCREMENT}), and in this app, action objects have no payload. You can also think of an action as a message or a command. In the next section, you’ll be defining each action as a class with two properties: type and payload.

This is an excerpt from Manning's book AngularJS in Action.
Now that you have the AngularJS game pieces on the table, how do you actually use them to put together something useful? This is the perfect time to build something easy with AngularJS. You’ll get your feet wet by building a scaled-down version of the sample application for the book; and, in the process, you’ll see how these AngularJS pieces fit together without getting too advanced. True to the title of this book, you’ll learn AngularJS by seeing it in action and assembling examples that tie into a larger, fully functional application.
Now that you’ve seen a service in action, let’s take a moment to talk about the actual lifecycle of a service.