Angular

Add an AI support assistant to an Angular application

Angular applications are usually large, long-lived, and careful about what enters the dependency graph. This enters nothing.

  • Two lines
  • About two minutes
  • One file
src/index.htmlfile
<!-- Matter Chat — paste right before </body> --><script>  window.MatterChat = window.MatterChat || { q: [] };  window.MatterChat.q.push(["init", { id: "bot_your_key" }]);</script><script async src="https://app.matterchat.co/widget.js"></script>
</body>

html · paste above the dimmed line

Where the snippet goes

Paste the two lines into src/index.html before the closing body tag. There is no module to import into your AppModule, no service to inject, and nothing to add to angular.json.

src/index.html
The single shell document, so one paste covers the application.
No NgModule changes
It is outside the Angular application entirely.
Router-safe
Client-side routing does not affect it, since it never relied on page loads.
!

Nothing to add to angular.json, no module to import into AppModule, and no service to inject.

Suited to internal tools

Angular is common for internal applications, where the support burden is a colleague explaining the same process repeatedly. Indexing internal documentation and putting the assistant in the app answers those questions where they arise.

What the crawler sees in an Angular app

Our crawler fetches HTML over HTTP and does not execute JavaScript — the same constraint most search engines apply on the first pass. A default Angular build renders in the browser, so a crawl of the app itself reads an empty shell. That is rarely a problem in practice, because the app is not usually where the answers live.

Nothing to review at upgrade time

Because no package is added, an Angular major-version upgrade has nothing to say about it. That is a real consideration in codebases where upgrades are a scheduled project.

Checking it actually worked

Four things, in order. The third is the one people skip, and it is the one that tells you whether the answers are grounded.

  1. 1Hard refresh the page — the launcher appears bottom-right.
  2. 2Ask it something your site answers, and check the reply cites a page.
  3. 3Ask it something your site does not cover, and check it declines.
  4. 4Open Conversations in the dashboard; both should be there.

On a different stack?

The snippet is the same everywhere. Only the place you paste it changes.

What developers ask

Short answers. If yours is not here, the assistant on this page will try it — and tell you honestly if it cannot.

Can you crawl the Angular app itself?

Only if it serves HTML — apps on @angular/ssr or with prerendered routes crawl fine. A default client-rendered build serves an empty shell to any non-executing crawler, so index your docs site or upload files instead.

Is there an Angular module or service?

No. It is a script tag in index.html, so nothing enters your module graph and there is nothing to inject.

Can it serve internal documentation?

Yes — internal material can be added as uploaded documents rather than crawled pages, so it does not need to be published publicly to be answerable.

Does it affect our build or bundle size?

No. Nothing is imported or bundled; the browser loads one small external script at runtime.

From the blog

All posts

Answer honestly. Capture the rest.

Point Matter Chat at your site and see what it can — and can't — answer. It's honest about both.

Start free — chat in your site

No credit card. 2 minute setup.

Every answer cites the source it came from. When there isn't one, it says so — and hands the visitor to you.

Installs on the tools you already run.