Skip to content

Commit 8ea7309

Browse files
committed
fix(material/icon): update error message for missing HttpClient
Updates the message saying that `HttpClient` is missing to refer to a non-deprecated API. Fixes #29587.
1 parent 1abb484 commit 8ea7309

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/material/icon/icon-registry.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ export function getMatIconNameNotFoundError(iconName: string): Error {
3939
*/
4040
export function getMatIconNoHttpProviderError(): Error {
4141
return Error(
42-
'Could not find HttpClient provider for use with Angular Material icons. ' +
43-
'Please include the HttpClientModule from @angular/common/http in your ' +
44-
'app imports.',
42+
'Could not find HttpClient for use with Angular Material icons. ' +
43+
'Please add provideHttpClient() to your providers.',
4544
);
4645
}
4746

src/material/icon/icon.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {wrappedErrorMessage} from '@angular/cdk/testing/private';
2+
import {HttpClientModule} from '@angular/common/http';
23
import {
34
HttpClientTestingModule,
45
HttpTestingController,

0 commit comments

Comments
 (0)