> For the complete documentation index, see [llms.txt](https://docs.videsk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videsk.io/es-developers/integraciones/frameworks/angular.md).

# Angular

Los métodos de integración en Angular dependerán en gran medida de la versión y arquitectura, por lo que los ejemplos a continuación se centrarán en máxima eficiencia en la importación y disponibilidad a través del código.

## Single App

En caso que estés desarrollando con Angular como SPA, te sugerimos añadir nuestros SDKs como dependencias JS en el archivo `index.html`.

```html
<head>
  ...
  <script src="https://cdn.videsk.io/sdk/webrtc.min.js"></script>
  ...
</head>
```

## Microfrontend

Si estás desarrollando con Angular basado en arquitectura microfrontend, la mejor forma es crear un archivo `scripts.js` o `dependencies.js` que contenga las importaciones necesarias.

De esta manera, podrás importar las dependencies con tree-shaking, y el archivo bundle excluirá las dependencias las cuales cargarán solo cuando sean necesarias.

{% code title="scripts.js" %}

```javascript
import WebRTC from 'https://cdn.videsk.io/sdk/webrtc.min.js';
import Calendar from 'https://cdn.videsk.io/sdk/calendar.min.js';

export { WebRTC, Calendar };
```

{% endcode %}

{% code title="app.component.ts" %}

```javascript
import { Component } from '@angular/core';
import { WebRTC, Calendar } from 'path/to/scripts.js';

@Component({
  selector: 'app-root',
  template: '<p>{{ message }}</p>',
})
export class AppComponent {
  message: string;

  constructor() {
    const webrtc = new WebRTC('JWT');
    const calendar = new Calendar();
  }
}
```

{% endcode %}

## Declarar componente web

Para usar nuestros componentes web puedes crear un componente Angular dentro de tu aplicación y luego asociarlo a nuestro componente web.

{% hint style="info" %}
Deberás cargar el componente desde nuestra CDN en tu `index.html`.
{% endhint %}

```javascript
import { Component, AfterViewInit } from '@angular/core';

declare const WebRTC: any;

@Component({
  selector: 'app-videsk-webrtc',
  template: '<videsk-webrtc></videsk-webrtc>'
})
export class MyComponent implements AfterViewInit {
  ngAfterViewInit() {
    new WebRTC(accessToken);
  }
}
```


---

# 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.videsk.io/es-developers/integraciones/frameworks/angular.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.
