From the course: Building Angular and ASP.NET Core Applications
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
NgRx actions
From the course: Building Angular and ASP.NET Core Applications
NgRx actions
- [Instructor] Actions are one of the main building blocks in NgRx. Actions express unique events that happen throughout your application. So, let's go to Visual Code and create our first actions. In here, before we start doing anything, let us install all the necessary packages. So, for that, right-click on ClientApp, and then open in Terminal. Let us clear the terminal in here by pressing cls, which stands for clear, and then type npm install. We are going to install the NgRx/core, then the NgRx/effects, we need this library for handling the side effects in our apps. Then the NgRx/store, and then, at the end, write --save. Now, let's go inside our ClientApp folder, then src, then app. Inside here, we are going to create a new folder, which is going to hold all the NgRx-related code. So, let's create a folder and name this folder store. Then, inside here, we are going to create the actions. So, for that, let's just…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.