@ng-icons/ionicons 27.0.0 → 27.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.
Files changed (2) hide show
  1. package/README.md +41 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,9 +1,15 @@
1
1
  <img width="600" alt="logo" src="https://github.com/ng-icons/ng-icons/assets/20795331/8781b0a9-2c8a-4a7f-9afd-13e47d14cffe">
2
2
 
3
+ <div style="margin-top: 1rem;">
4
+ <img alt="NPM Downloads" src="https://img.shields.io/npm/dt/%40ng-icons%2Fcore">
5
+ <img alt="NPM Version" src="https://img.shields.io/npm/v/%40ng-icons%2Fcore">
6
+ <img alt="GitHub Sponsors" src="https://img.shields.io/github/sponsors/ashley-hunter">
7
+ </div>
8
+
3
9
  # Ng Icons
4
10
 
5
11
  The all-in-one icon library for Angular. This allows you to use icons from multiple icon sets with a single icon component.
6
- Containing over 35,500 icons for you to use in your projects.
12
+ Containing over 37,700 icons for you to use in your projects.
7
13
 
8
14
  Currently, we support the following libraries:
9
15
 
@@ -32,6 +38,12 @@ Currently, we support the following libraries:
32
38
 
33
39
  Got suggestions for additional iconsets? Create an issue and we can consider adding them!
34
40
 
41
+ ## Supporting Ng Icons
42
+
43
+ Ng Icons is an MIT-licensed open source project with its ongoing development made possible by contributors and sponsors.
44
+
45
+ [Become a Sponsor!](https://github.com/sponsors/ashley-hunter).
46
+
35
47
  ## Supported Versions
36
48
 
37
49
  | Angular Version | Ng Icon Version |
@@ -42,7 +54,7 @@ Got suggestions for additional iconsets? Create an issue and we can consider add
42
54
  | 14.x.x | 17.x.x - 22.x.x |
43
55
  | 15.x.x | 23.x.x - 24.x.x |
44
56
  | 16.x.x | 25.x.x |
45
- | 17.x.x | 26.x.x |
57
+ | 17.x.x | 26.x.x - 27.x.x |
46
58
 
47
59
  > **Note**: Ng Icons relies on modern browser features and is designed to work on evergreen browsers. We do not support older browsers such as IE11.
48
60
 
@@ -208,6 +220,33 @@ bootstrapApplication(AppComponent, {
208
220
  });
209
221
  ```
210
222
 
223
+ ### Content Security Policy
224
+
225
+ 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.
226
+
227
+ ```ts
228
+ import { NgIconComponent, provideIcons, provideNgIconsConfig, withContentSecurityPolicy } from '@ng-icons/core';
229
+
230
+ bootstrapApplication(AppComponent, {
231
+ providers: [provideNgIconsConfig({}, withContentSecurityPolicy())],
232
+ });
233
+ ```
234
+
235
+ ### Logging
236
+
237
+ By default Ng Icons will log warnings or errors to the console - notably if you try to use an icon that has not been registered.
238
+ Should you want stricter checks you can enable the `ExceptionLogger` which will throw an error if you try to use an icon that has not been registered.
239
+
240
+ You can enable this by providing the `withExceptionLogger` function to the `provideNgIconsConfig` function.
241
+
242
+ ```ts
243
+ import { NgIconComponent, provideIcons, provideNgIconsConfig, withExceptionLogger } from '@ng-icons/core';
244
+
245
+ bootstrapApplication(AppComponent, {
246
+ providers: [provideNgIconsConfig({}, withExceptionLogger())],
247
+ });
248
+ ```
249
+
211
250
  ### Dynamically Loading Icons
212
251
 
213
252
  The most common way to load icons is simply by registering them individually, however you may want to load icons lazily from a URL, or generate an SVG programatically on the fly. This can be achived using an icon loader. Icon loaders are a function that receives the name of the requested icon, and can return an `Observable<string>`, `Promise<string>` or a `string` containing the SVG to render. Within this function you can do whatever you need to retrieve an icon.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-icons/ionicons",
3
- "version": "27.0.0",
3
+ "version": "27.2.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.2.0"
6
6
  },