-
Notifications
You must be signed in to change notification settings - Fork 154
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
7 changed files
with
83 additions
and
12 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,42 @@ | ||
# Upgrading 0.5.0 to 0.6.0 | ||
|
||
## Migrate from global icon library to FaIconLibrary | ||
|
||
See [upgrade instructions](https://github.com/FortAwesome/angular-fontawesome/blob/master/docs/upgrading/0.4.0-0.5.0.md#migrate-from-global-icon-library-to-faiconlibrary) for the previous release. | ||
|
||
## `FaIcon.icon` and `FaDuotoneIcon.icon` inputs are now required | ||
|
||
`icon` input of these components is now required and will throw an error if it is missing or set to `null` or `underfined`. Review your application for unexpected errors and ensure that `fa-icon` component always has a meaningful `icon` input. | ||
|
||
When using `AsyncPipe` with `icon` input you have 3 options: | ||
|
||
- Do not render `fa-icon` component until icon is loaded | ||
|
||
```html | ||
<fa-icon *ngIf="icon$ | async as icon" [icon]="icon"></fa-icon> | ||
``` | ||
|
||
- Render a placeholder icon while icon is loaded | ||
|
||
```typescript | ||
this.icon$ = this.loadIcon().pipe(startsWith(defaultIcon)); | ||
``` | ||
|
||
- Provide a fallback icon to be used instead of any missing icon in the application | ||
|
||
```typescript | ||
import { FaConfig } from '@fortawesome/angular-fontawesome'; | ||
import { faBan } from '@fortawesome/free-solid-svg-icons'; | ||
|
||
export class AppModule { | ||
constructor(config: FaConfig) { | ||
config.fallbackIcon = faBan; | ||
} | ||
} | ||
``` | ||
|
||
## Icon definition missing from the icon library is now hard error | ||
|
||
Previously attempt to render an icon, which is missing from the icon library was logging a soft warning. In this release the warning was changed to a hard error to improve discoverability of such bugs. Review your application for unexpected errors and ensure that all used icons are added to the icon library. | ||
|
||
Also refer to the [testing documentation](https://github.com/FortAwesome/angular-fontawesome/blob/master/docs/guide/testing.md#test-components-using-icon-library) to learn how to test components using icon library without getting missing icon errors. |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"$schema": "./node_modules/ng-packagr/package.schema.json", | ||
"name": "@fortawesome/angular-fontawesome", | ||
"version": "0.5.0", | ||
"version": "0.6.0-alpha.0", | ||
"description": "Angular Fontawesome, an Angular library", | ||
"scripts": { | ||
"test": "ng test angular-fontawesome --watch=false --browsers=ChromeCI", | ||
|
@@ -40,7 +40,8 @@ | |
"Damien Retzinger <[email protected]>", | ||
"Ronnie Barker <[email protected]>", | ||
"bhanuhiteshi <[email protected]>", | ||
"James Hyde <[email protected]>" | ||
"James Hyde <[email protected]>", | ||
"ej2 <[email protected]>" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const svgCoreVersion = '^1.2.21'; | ||
export const angularFontawesomeVersion = '~0.5.0'; | ||
export const angularFontawesomeVersion = '~0.6.0-alpha.0'; | ||
export const iconPackVersion = '^5.10.2'; |