> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/get-started/faq/angular-integration-issues.md).

# Angular project WebViewer integration issues

World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

* The WebViewer does not load properly and the HTML component is recursively re-rendered inside (see image below). How should I fix this?This error has likely occurred because WebViewer can't find it's library. Please make sure that you have done the following:
  * The library containing the `webviewer.min.js` file is not located inside the `PROJ_PATH/src/app/` folder or any of its sub-folders
  * You have correctly added the path to `webviewer.min.js` to the `scripts` array under the `build` options array in `angular.json`
  * You have correctly added the path to the library in the `assets` array under the `build` options in `angular.json`

![](https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-9bbdfeefc8b12d7bc7494d97155470fc4a69fe30%2F0a70d87766b628d9af898cf004471c1edd412a71-1943x961.png?alt=media)

* WebViewer having issues with progressive web application (PWA)

When using WebViewer as part of a PWA, make sure to include the path to WebViewer "lib" folder in your `ngsw-config.json` file. Also WebViewer needs to pass configuration information to it's workers. Make sure that you are not setting `ignoreSearch` to be `true` under [cacheQueryOptions](https://angular.io/guide/service-worker-config/#cachequeryoptions). So in your `ngsw-config.json` file

{% tabs %}
{% tab title="JSON" %}
{% code lineNumbers="true" %}

```json
"assetGroups": [
  {
    "name": "app",
    "installMode": "prefetch",
    "resources": {
      "files": [
        "/favicon.ico",
        "/index.html",
        "/manifest.webmanifest",
        "/*.css",
        "/*.js",
      ]
    },
    "cacheQueryOptions": {
      "ignoreSearch": true
    }
  },
  {
    "name": "webviewerResources",
    "installMode": "prefetch",
    "resources": {
      "files": [
        "/path to WebViewer lib folder/lib/**"
      ]
    },
    "cacheQueryOptions": {
      "ignoreSearch": false
    }
  },
]
```

{% endcode %}
{% endtab %}
{% endtabs %}

`ignoreSearch` default value is `false` so the `ignoreSearch` above is actually not needed. If a project requires `ignoreSearch` be to `true` for other resources, make sure to not set it to `true` for WebViewer's resources


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/get-started/faq/angular-integration-issues.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
