-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from czeckd/update-readme
Update for standalone
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,15 +66,17 @@ export class AppModule {} | |
### Standalone Example | ||
|
||
```typescript | ||
import { HttpClientModule } from '@angular/common/http'; | ||
import { SvgIconComponent, provideAngularSvgIcon } from 'angular-svg-icon'; | ||
|
||
@NgModule({ | ||
imports: [ HttpClientModule, SvgIconComponent ], | ||
providers: [ provideAngularSvgIcon() ], | ||
... | ||
}) | ||
export class AppModule {} | ||
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; | ||
import { provideHttpClient } from '@angular/common/http'; | ||
import { provideAngularSvgIcon } from 'angular-svg-icon'; | ||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [ | ||
provideZoneChangeDetection({ eventCoalescing: true }), | ||
provideHttpClient(), | ||
provideAngularSvgIcon() | ||
] | ||
}; | ||
``` | ||
|
||
:grey_exclamation: **BREAKING CHANGE**: as of [email protected], an explicit call to `forRoot()` | ||
|