Skip to content
Oren Farhi edited this page Jun 17, 2016 · 1 revision

This page should reference any tips, tutorials examples and other useful tips.

Usage With Build Tools

Angular-Cli

There's a solution for that (adopted from ng boostrap issue):
add angular2-infinite-scroll to system-config.ts:

const barrels: string[] = [
  // other Angular specific barrels...

  // other Thirdparty barrels.
  // add this one:
  'angular2-infinite-scroll',

  // other App specific barrels.
];

update system config as well in the system-config.js:

System.config({
  map: {
    '@angular': 'vendor/@angular',
    'rxjs': 'vendor/rxjs',
    'main': 'main.js',
    'angular2-infinite-scroll': 'vendor/angular2-infinite-scroll'
  },
  packages: cliSystemConfigPackages
});

add this to vendorNpmFiles angular-cli-build.js:

'angular2-infinite-scroll/**/*.js'

Webpack

No special handling is needed. Simply import with:

import { InfiniteScroll } from 'angular2-infinite-scroll';
Clone this wiki locally