-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGES: 1. The context of `LetDirective` is strongly typed when `null` or `undefined` is passed as input. BEFORE: ```html <p *ngrxLet="null as n">{{ n }}</p> <p *ngrxLet="undefined as u">{{ u }}</p> ``` - The type of `n` is `any`. - The type of `u` is `any`. AFTER: ```html <p *ngrxLet="null as n">{{ n }}</p> <p *ngrxLet="undefined as u">{{ u }}</p> ``` - The type of `n` is `null`. - The type of `u` is `undefined`. --- 2. Arrays, iterables, generator functions, and readable streams are not treated as observable-like inputs anymore. To keep the same behavior as in v13, convert the array/iterable/generator function/readable stream to observable using the `from` function from the `rxjs` package before passing it to the `LetDirective`/`PushPipe`. BEFORE: ```ts @component({ template: ` <p *ngrxLet="numbers as n">{{ n }}</p> <p>{{ numbers | ngrxPush }}</p> `, }) export class NumbersComponent { numbers = [1, 2, 3]; } ``` AFTER: ```ts @component({ template: ` <p *ngrxLet="numbers$ as n">{{ n }}</p> <p>{{ numbers$ | ngrxPush }}</p> `, }) export class NumbersComponent { numbers$ = from([1, 2, 3]); } ```
- Loading branch information
1 parent
5188b68
commit 70056a8
Showing
14 changed files
with
437 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export function stripSpaces(str: string): string { | ||
return str.replace(/[\n\r\s]+/g, ''); | ||
} | ||
|
||
export function wrapWithSpace(str: string): string { | ||
return ' ' + str + ' '; | ||
} |
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.