From the course: Angular: Testing and Debugging

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Changes for Angular v16

Changes for Angular v16

For newer versions of Angular like versions 15 and 16, the Angular team recommends using plain classes for custom error handlers instead of injecting them through Angular's dependency injection. For our ErrorMetadataService, this means we can get rid of the injectable decorator and just export the class as written. We use this new plane class just like we did before, by adding it to the array of providers and overriding the default error handler with our custom ErrorMetadataService. Check out Angular's official documentation for more info.

Contents