@ng-icons/ionicons 30.0.0 → 30.2.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 +13 -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 69,000 icons for you to use in your projects.
|
|
13
13
|
|
|
14
14
|
Currently, we support the following libraries:
|
|
15
15
|
|
|
@@ -41,6 +41,8 @@ Currently, we support the following libraries:
|
|
|
41
41
|
- [Devicon](https://github.com/devicons/devicon/)
|
|
42
42
|
- [Game Icons](https://game-icons.net/)
|
|
43
43
|
- [Flag Icons](https://flagicons.lipis.dev/)
|
|
44
|
+
- [Solar Icons](https://github.com/480-Design/Solar-Icon-Set)
|
|
45
|
+
- [SVGL](https://svgl.app)
|
|
44
46
|
|
|
45
47
|
Got suggestions for additional iconsets? Create an issue and we can consider adding them!
|
|
46
48
|
|
|
@@ -117,6 +119,8 @@ The following packages are available:
|
|
|
117
119
|
| `@ng-icons/huge-icons` | CC0-1.0 |
|
|
118
120
|
| `@ng-icons/devicon` | MIT |
|
|
119
121
|
| `@ng-icons/game-icons` | CC BY 3.0 |
|
|
122
|
+
| `@ng-icons/solar-icons` | CC BY 4.0 |
|
|
123
|
+
| `@ng-icons/svgl` | MIT |
|
|
120
124
|
|
|
121
125
|
## Usage
|
|
122
126
|
|
|
@@ -152,16 +156,16 @@ You can then use the icon in your templates:
|
|
|
152
156
|
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
157
|
would be in the `@Component` providers array.
|
|
154
158
|
|
|
155
|
-
You can also import the component directly by importing `
|
|
159
|
+
You can also import the component directly by importing `NgIcon` or the `NG_ICON_DIRECTIVES` constant.
|
|
156
160
|
|
|
157
161
|
```ts
|
|
158
|
-
import {
|
|
162
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
159
163
|
import { featherAirplay } from '@ng-icons/feather-icons';
|
|
160
164
|
import { heroUsers } from '@ng-icons/heroicons/outline';
|
|
161
165
|
|
|
162
166
|
@Component({
|
|
163
167
|
standalone: true,
|
|
164
|
-
imports: [
|
|
168
|
+
imports: [NgIcon],
|
|
165
169
|
providers: [provideIcons({ featherAirplay, heroUsers })],
|
|
166
170
|
})
|
|
167
171
|
export class AppComponent {}
|
|
@@ -185,12 +189,12 @@ export class ParentComponent {
|
|
|
185
189
|
}
|
|
186
190
|
|
|
187
191
|
// child.component.ts
|
|
188
|
-
import {
|
|
192
|
+
import { NgIcon } from '@ng-icons/core';
|
|
189
193
|
|
|
190
194
|
@Component({
|
|
191
195
|
standalone: true,
|
|
192
196
|
selector: 'app-child',
|
|
193
|
-
imports: [
|
|
197
|
+
imports: [NgIcon],
|
|
194
198
|
template: '<ng-icon [svg]="icon" />',
|
|
195
199
|
})
|
|
196
200
|
export class ChildComponent {
|
|
@@ -223,7 +227,7 @@ export class AppModule {}
|
|
|
223
227
|
#### Standalone
|
|
224
228
|
|
|
225
229
|
```ts
|
|
226
|
-
import {
|
|
230
|
+
import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core';
|
|
227
231
|
|
|
228
232
|
bootstrapApplication(AppComponent, {
|
|
229
233
|
providers: [
|
|
@@ -239,7 +243,7 @@ bootstrapApplication(AppComponent, {
|
|
|
239
243
|
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
244
|
|
|
241
245
|
```ts
|
|
242
|
-
import {
|
|
246
|
+
import { NgIcon, provideIcons, provideNgIconsConfig, withContentSecurityPolicy } from '@ng-icons/core';
|
|
243
247
|
|
|
244
248
|
bootstrapApplication(AppComponent, {
|
|
245
249
|
providers: [provideNgIconsConfig({}, withContentSecurityPolicy())],
|
|
@@ -254,7 +258,7 @@ Should you want stricter checks you can enable the `ExceptionLogger` which will
|
|
|
254
258
|
You can enable this by providing the `withExceptionLogger` function to the `provideNgIconsConfig` function.
|
|
255
259
|
|
|
256
260
|
```ts
|
|
257
|
-
import {
|
|
261
|
+
import { NgIcon, provideIcons, provideNgIconsConfig, withExceptionLogger } from '@ng-icons/core';
|
|
258
262
|
|
|
259
263
|
bootstrapApplication(AppComponent, {
|
|
260
264
|
providers: [provideNgIconsConfig({}, withExceptionLogger())],
|