JonnyBGod / ngx-scrollspy

Angular ScrollSpy Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parallax does not work

Saulolxx opened this issue · comments

I've imported everything into the app module as directed, but when I roll scrool, the console is notified and nothing happens!

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';


import { AppComponent } from './app.component';
import { PageIndexComponent } from './page-index/page-index.component';
import { ScrollSpyModule,  ScrollSpyParallaxModule } from 'ngx-scrollspy';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    ScrollSpyModule.forRoot(),
    ScrollSpyParallaxModule 
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

page-index.component.html

 <div [scrollSpyParallax] = "{
    property: 'backgroundPositionX',
    ratio: -.2
  }"   class="divimage dzsparallaxer--target w-100 g-bg-pos-bottom-center" style="height: 120%; background-image: url(assets/img-temp/1920x1080/img25.jpg);"></div>

Did you solve this? Is ther any working example with parallex?
Thanks!!