Closed Sonntagskind closed 7 years ago
I know this library is using ScrollReveal as a dependency, but unfortunately I don't have much to offer you @Sonntagskind. I'm not the author, nor am I very experienced with Angular 2.
I recommend opening your issue here instead.
🐝
@jlmakes Thanks, I will.
I installed npm scrollreveal and ng2-scrollreveal for my Angular2 app. The app consists of three sections: Home, About, Contact I want the About section stuff to be revealed, then following the official guide I add to my div class "item" and set the attribute [ngsReveal]="{ reset: true}"
When I click either Home or Contact sections (where's no content for revealing) console shows no errors, but when I click About section (where's my content to be revealed on scroll) console shows me following errors
My app.module.ts file: `import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { NgsRevealModule } from 'ng2-scrollreveal'; import { AppComponent } from './app.component';
import { AppRoutingModule, routingComponents } from './app.routing';
@NgModule({ declarations: [ AppComponent, routingComponents ], imports: [ NgsRevealModule.forRoot(), BrowserModule, AppRoutingModule ], bootstrap: [ AppComponent ] }) export class AppModule { }`
My system.config.js file `import { Component } from '@angular/core'; import { NgsRevealModule } from 'ng2-scrollreveal';
@Component({ selector: 'about-block', providers: [ NgsRevealModule ], templateUrl: 'app/about.component.html' })
export class AboutComponent {}`
My about.component.html file `(function (global) { System.config({ paths: { 'npm:': 'node_modules/' },
}); })(this);`
P.S. Earlier there was an error about ng-2 scrollreveal too, but I manually updated the system.config file inserting the line:
'ng2-scrollreveal': 'npm:ng2-scrollreveal/bundles/ng2-scrollreveal.min.js',
Doing the same with scrollreveal doesn't work and console keeps throwing the same error. Please, help figure out what's been done wrong.