I want use infinite scroll in my angular 4 project. but when i installed it then it will give "Unexpected token <" error.
I am explaingin what is the step.
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { InfiniteScrollModule } from "ngx-infinite-scroll";
@NgModule({
imports: [BrowserModule, ReactiveFormsModule, HttpModule, FormsModule, InfiniteScrollModule],
declarations: [AppComponent],
providers: [{ provide: APP_BASE_HREF, useValue: '/' }],
bootstrap: [AppComponent]
})
export class AppModule { }
· And add in systemjs.config file like this
'ngx-infinite-scroll': 'npm:ngx-infinite-scroll/bundles/ngx-infinite-scroll.umd.js',
But when I run my application then it will give error
Unexpected token >
If I write “'ngx-infinite-scroll': 'npm:ngx-infinite-scroll” then it gives different error given below.
Error loading http://localhost:51430/node_modules/ngx-infinite-scroll as "ngx-infinite-scroll" from http://localhost:51430/app/app.module.js
Plz resolve this.