JonnyBGod / ngx-scrollspy

Angular ScrollSpy Service
MIT License
94 stars 21 forks source link

Parallax does not work #182

Open Saulolxx opened 7 years ago

Saulolxx commented 7 years ago

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>
ORECHN commented 6 years ago

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