# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://k3nsei.gitbook.io/ng-in-viewport/getting-started/import-the-modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
