Skip to content

Instantly share code, notes, and snippets.

@lasfrancisco
lasfrancisco / aos-component.ts
Created September 6, 2019 14:59
Animate On Scroll - Component
@Component({
selector: '[wmAnimate]',
template: '<ng-content></ng-content>',
animations: $animations
})
export class AnimateComponent implements OnInit, OnDestroy {
readonly timings = { slower: '3s', slow: '2s', normal: '1s', fast: '500ms', faster: '300ms' };
constructor(private elm: ElementRef, private scroll: ScrollDispatcher, private zone: NgZone) {}
@lasfrancisco
lasfrancisco / aos-home.html
Last active September 5, 2019 15:24
Animate On Scroll page template example
<section fxLayout="row" fxLayoutAlign="center center">
<div fxFlex="50" wmAnimate="landing" speed="slow" aos>
<h1 class="mat-display-1"><b>Get your app done right</b></h1>
<p>Wizdm provides wonders to your singple page application</p>
<button mat-raised-button color="accent" routerLink="/">Get started</button>