# Import the modules

&#x20;Import the **`InViewportModule`** for each component you want to use:

{% code title="/src/app/app.module.ts" %}
```typescript
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { InViewportModule } from 'ng-in-viewport';

import { AppComponent } from './app.component';

@NgModule({
    imports: [
        BrowserModule,
        InViewportModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule {}
```
{% endcode %}

If you want to support legacy browsers like for example _**IE11**_ you need to install and load **`IntersectionObserver`** polyfill to your **`src/polyfills.ts`** file:

```
$ yarn add intersection-observer
```

```
$ npm install --save intersection-observer
```

{% code title="/src/polyfills.ts" %}
```typescript
import 'intersection-observer';
```
{% endcode %}
