@ng-icons/ionicons 26.5.0 → 27.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.
Files changed (2) hide show
  1. package/README.md +15 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # Ng Icons
4
4
 
5
5
  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.
6
+ Containing over 37,700 icons for you to use in your projects.
7
7
 
8
8
  Currently, we support the following libraries:
9
9
 
@@ -42,7 +42,7 @@ Got suggestions for additional iconsets? Create an issue and we can consider add
42
42
  | 14.x.x | 17.x.x - 22.x.x |
43
43
  | 15.x.x | 23.x.x - 24.x.x |
44
44
  | 16.x.x | 25.x.x |
45
- | 17.x.x | 26.x.x |
45
+ | 17.x.x | 26.x.x - 27.x.x |
46
46
 
47
47
  > **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
48
 
@@ -208,6 +208,18 @@ bootstrapApplication(AppComponent, {
208
208
  });
209
209
  ```
210
210
 
211
+ ### Content Security Policy
212
+
213
+ 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.
214
+
215
+ ```ts
216
+ import { NgIconComponent, provideIcons, provideNgIconsConfig, withContentSecurityPolicy } from '@ng-icons/core';
217
+
218
+ bootstrapApplication(AppComponent, {
219
+ providers: [provideNgIconsConfig({}, withContentSecurityPolicy())],
220
+ });
221
+ ```
222
+
211
223
  ### Dynamically Loading Icons
212
224
 
213
225
  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.
@@ -219,7 +231,7 @@ bootstrapApplication(AppComponent, {
219
231
  providers: [
220
232
  provideNgIconLoader(name => {
221
233
  const http = inject(HttpClient);
222
- return http.get(`/assets/icons/${name}.svg`);
234
+ return http.get(`/assets/icons/${name}.svg`, { responseType: 'text' });
223
235
  }),
224
236
  ],
225
237
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-icons/ionicons",
3
- "version": "26.5.0",
3
+ "version": "27.1.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.2.0"
6
6
  },