From the course: Building Angular and ASP.NET Core Applications
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Handling errors in Angular
From the course: Building Angular and ASP.NET Core Applications
Handling errors in Angular
- [Instructor] We have implemented the core features of our app, but so far, we kind of assumed that everything will work as expected, and that is not the case all the time. So, what we need to do is that we need to take care of the errors as well. Like, what happens when something goes wrong, or when the users do not provide the necessary data? Let us go to our app, and see an example. So, let us say we want to add a new book. In here I'll not provide any data, even though it says that the title, author, and description fields are required. If I click Add, the API endpoint is going to return a successful response, so I have added nothing to my collection, which is just wrong. Now, let us close the app, and go and fix this issue in our web API. So, now we go inside the controllers, then BooksController, close the terminal, and scroll down to the AddBook method. Let us put the breaking point. And here we are going to add…
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.
Contents
-
-
-
-
-
Angular key concepts2m 25s
-
(Locked)
Generating components and services4m 47s
-
(Locked)
Cleaning up code and updating the router7m 11s
-
(Locked)
Designing the Books page8m 10s
-
(Locked)
Reading data from Angular3m 39s
-
(Locked)
Designing the Create page9m 4s
-
(Locked)
Adding new data from Angular9m 50s
-
(Locked)
Designing the Book Details page7m 44s
-
(Locked)
Getting a single book from Angular3m 18s
-
(Locked)
Updating existing data from Angular9m 20s
-
(Locked)
Deleting data from Angular6m 45s
-
(Locked)
Handling errors in Angular12m 24s
-
-
-
-