-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
221 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE | ||
*/ | ||
|
||
import { EnvironmentProviders, makeEnvironmentProviders, Provider } from '@angular/core'; | ||
|
||
import { IconDefinition } from '@ant-design/icons-angular'; | ||
|
||
import { NZ_ICONS, NZ_ICONS_PATCH, NzIconPatchService } from './icon.service'; | ||
|
||
/** | ||
* Provide icon definitions for NzIcon in root | ||
* | ||
* @param icons Icon definitions | ||
*/ | ||
export const provideNzIcons = (icons: IconDefinition[]): EnvironmentProviders => { | ||
return makeEnvironmentProviders([ | ||
{ | ||
provide: NZ_ICONS, | ||
useValue: icons | ||
} | ||
]); | ||
}; | ||
|
||
/** | ||
* Provide icon definitions for NzIcon in feature module or standalone component | ||
* | ||
* @param icons Icon definitions | ||
*/ | ||
export const provideNzIconsPatch = (icons: IconDefinition[]): Provider[] => { | ||
return [ | ||
NzIconPatchService, | ||
{ | ||
provide: NZ_ICONS_PATCH, | ||
useValue: icons | ||
} | ||
]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.