@ng-icons/ionicons 27.1.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 +27 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,11 @@
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.
@@ -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 |
@@ -220,6 +232,21 @@ bootstrapApplication(AppComponent, {
220
232
  });
221
233
  ```
222
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
+
223
250
  ### Dynamically Loading Icons
224
251
 
225
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.1.0",
3
+ "version": "27.2.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.2.0"
6
6
  },