SimpleParallax.js wrapper for Angular
The ngx-simple-parallax-js can be installed with npm:
npm install ngx-simple-parallax-js simple-parallax-js@^5.6.2
Then, import NgxSimpleParallaxJsModule into a module of your Angular app.
import { NgxSimpleParallaxJsModule } from 'ngx-simple-parallax-js';
@NgModule({
// ...
imports: [NgxSimpleParallaxJsModule]
// ...
})
export class YourModule {}
In images:
<img parallax src="image.jpg" alt="image">
In videos:
<video parallax>
<source src="video.mp4" type="video/mp4">
</video>
With configs:
<img parallax [parallaxConfig]="parallaxConfig" src="image.jpg" alt="image">
Complete documentation for simpleParallax.js
: Official docs