@ng-icons/ionicons 30.0.0 → 30.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
# Ng Icons
|
|
10
10
|
|
|
11
11
|
The all-in-one icon library for Angular. This allows you to use icons from multiple icon sets with a single icon component.
|
|
12
|
-
Containing over
|
|
12
|
+
Containing over 66,000 icons for you to use in your projects.
|
|
13
13
|
|
|
14
14
|
Currently, we support the following libraries:
|
|
15
15
|
|
|
@@ -152,16 +152,16 @@ You can then use the icon in your templates:
|
|
|
152
152
|
As of version 18.0.0 Ng Icons nows supports standalone components. You can import icons using the `provideIcons` function which can be placed anywhere you can register providers. The optimal location
|
|
153
153
|
would be in the `@Component` providers array.
|
|
154
154
|
|
|
155
|
-
You can also import the component directly by importing `
|
|
155
|
+
You can also import the component directly by importing `NgIcon` or the `NG_ICON_DIRECTIVES` constant.
|
|
156
156
|
|
|
157
157
|
```ts
|
|
158
|
-
import {
|
|
158
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
159
159
|
import { featherAirplay } from '@ng-icons/feather-icons';
|
|
160
160
|
import { heroUsers } from '@ng-icons/heroicons/outline';
|
|
161
161
|
|
|
162
162
|
@Component({
|
|
163
163
|
standalone: true,
|
|
164
|
-
imports: [
|
|
164
|
+
imports: [NgIcon],
|
|
165
165
|
providers: [provideIcons({ featherAirplay, heroUsers })],
|
|
166
166
|
})
|
|
167
167
|
export class AppComponent {}
|
|
@@ -185,12 +185,12 @@ export class ParentComponent {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
// child.component.ts
|
|
188
|
-
import {
|
|
188
|
+
import { NgIcon } from '@ng-icons/core';
|
|
189
189
|
|
|
190
190
|
@Component({
|
|
191
191
|
standalone: true,
|
|
192
192
|
selector: 'app-child',
|
|
193
|
-
imports: [
|
|
193
|
+
imports: [NgIcon],
|
|
194
194
|
template: '<ng-icon [svg]="icon" />',
|
|
195
195
|
})
|
|
196
196
|
export class ChildComponent {
|
|
@@ -223,7 +223,7 @@ export class AppModule {}
|
|
|
223
223
|
#### Standalone
|
|
224
224
|
|
|
225
225
|
```ts
|
|
226
|
-
import {
|
|
226
|
+
import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core';
|
|
227
227
|
|
|
228
228
|
bootstrapApplication(AppComponent, {
|
|
229
229
|
providers: [
|
|
@@ -239,7 +239,7 @@ bootstrapApplication(AppComponent, {
|
|
|
239
239
|
If your application has a strict Content Security Policy (CSP) you may need to add the following to your global configuration to ensure you do not get any errors.
|
|
240
240
|
|
|
241
241
|
```ts
|
|
242
|
-
import {
|
|
242
|
+
import { NgIcon, provideIcons, provideNgIconsConfig, withContentSecurityPolicy } from '@ng-icons/core';
|
|
243
243
|
|
|
244
244
|
bootstrapApplication(AppComponent, {
|
|
245
245
|
providers: [provideNgIconsConfig({}, withContentSecurityPolicy())],
|
|
@@ -254,7 +254,7 @@ Should you want stricter checks you can enable the `ExceptionLogger` which will
|
|
|
254
254
|
You can enable this by providing the `withExceptionLogger` function to the `provideNgIconsConfig` function.
|
|
255
255
|
|
|
256
256
|
```ts
|
|
257
|
-
import {
|
|
257
|
+
import { NgIcon, provideIcons, provideNgIconsConfig, withExceptionLogger } from '@ng-icons/core';
|
|
258
258
|
|
|
259
259
|
bootstrapApplication(AppComponent, {
|
|
260
260
|
providers: [provideNgIconsConfig({}, withExceptionLogger())],
|