-
-
Save nxpatterns/0638be7c748125baad7dcef720a971c1 to your computer and use it in GitHub Desktop.
Revisions
-
LironHazan revised this gist
Oct 13, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ registerTransitionEnd<T extends {propertyName}>(el: FromEventTarget<T>, propName: string) { // Returns an Observable from DOM event fromEvent(el, 'transitionend') .pipe( filter(({ propertyName }: T) => propertyName === propName) // Will only emit value for the wanted css prop name e.g. height ) .subscribe((_) => { this.transitionEnd.emit(); -
LironHazan created this gist
Oct 10, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ registerTransitionEnd<T extends {propertyName}>(el: FromEventTarget<T>, propName: string) { fromEvent(el, 'transitionend') .pipe( takeUntil(this._ngUnSubscribe), filter(({ propertyName }: T) => propertyName === propName) ) .subscribe((_) => { this.transitionEnd.emit(); }); }