File tree 5 files changed +15
-10
lines changed
packages/shared/ui-global/icon/src/lib
5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
import { HttpClient } from '@angular/common/http' ;
2
2
import { of , tap } from 'rxjs' ;
3
3
import { Icon } from './types' ;
4
+ import { Injectable } from '@angular/core' ;
4
5
6
+ @Injectable ( { providedIn : 'root' } )
5
7
export class IconRegistry {
6
8
#cache: Partial < Record < Icon , string > > = { } ;
7
9
@@ -19,3 +21,10 @@ export class IconRegistry {
19
21
this . #cache[ name ] = icon ;
20
22
} ;
21
23
}
24
+
25
+ export function provideIconRegistry ( ) {
26
+ return {
27
+ provide : IconRegistry ,
28
+ deps : [ HttpClient ] ,
29
+ } ;
30
+ }
Original file line number Diff line number Diff line change 1
- import { HttpClient } from '@angular/common/http' ;
2
1
import { IconRegistry } from './icon-registry' ;
3
2
import { Icon } from './types' ;
4
3
import { take } from 'rxjs' ;
@@ -20,12 +19,6 @@ import {
20
19
}
21
20
` ,
22
21
standalone : true ,
23
- providers : [
24
- {
25
- provide : IconRegistry ,
26
- deps : [ HttpClient ] ,
27
- } ,
28
- ] ,
29
22
} )
30
23
export class IconComponent implements OnInit {
31
24
renderer = inject ( Renderer2 ) ;
Original file line number Diff line number Diff line change @@ -45,4 +45,4 @@ type ECommerce =
45
45
| 'ticket-alt'
46
46
| 'ticket' ;
47
47
48
- export type ECommerceIcon = `e- commerce/${ECommerce } `;
48
+ export type ECommerceIcon = `commerce/${ECommerce } `;
Original file line number Diff line number Diff line change 1
- import { ECommerceIcon } from './e- commerce' ;
1
+ import { ECommerceIcon } from './commerce' ;
2
2
import { TransportIcon } from './transport' ;
3
3
import { SoftwareIcon } from './software' ;
4
4
import { BuildingIcon } from './building' ;
@@ -111,6 +111,9 @@ type Root =
111
111
| 'star'
112
112
| 'sticker'
113
113
| 'subtitles'
114
+ | 'tag'
115
+ | 'tag-plus'
116
+ | 'tag-minus'
114
117
| 'time-loading'
115
118
| 'time-sleep'
116
119
| 'timer-alt'
Original file line number Diff line number Diff line change 1
1
export * from './arrow' ;
2
2
export * from './building' ;
3
3
export * from './doc' ;
4
- export * from './e- commerce' ;
4
+ export * from './commerce' ;
5
5
export * from './emoji' ;
6
6
export * from './icon' ;
7
7
export * from './menu' ;
You can’t perform that action at this time.
0 commit comments