An open API service indexing awesome lists of open source software.

https://github.com/ekkolon/ngx-gist

Embedding GitHub Gists in Angular apps made easy
https://github.com/ekkolon/ngx-gist

angular embed github-gist iframe iframe-embeds typescript

Last synced: 2 months ago
JSON representation

Embedding GitHub Gists in Angular apps made easy

Awesome Lists containing this project

README

        

# ngx-gist

[![NPM Version][npm-image]][npm-url]

A simple and lightweight library for embedding GitHub Gists in your Angular applications.

![Alt text](/projects/ngx-gist-playground/src/assets/animated/ngx-gist-example.gif?raw=true "Optional Title")

## Features

- Embed all files from a GitHub gist
- Embed a single target file
- Auto-sized iframe
- Runs outside NgZone

## Requirements

Make sure to have `iframe-resizer` installed. This library is needed for auto-resizing the iframe in which the gist is rendered.

```shell
npm install iframe-resizer
```

**Install `ngx-gist`**

```bash
npm install @ekkolon/ngx-gist
```

## Usage

```ts
// app.module.ts

import {NgxGistModule} from '@ekkolon/ngx-gist'

export class AppModule {
...
imports: [
...
NgxGistModule
]
}
```

```html

...





...
```

## Authors

- [@ekkolon](https://www.github.com/ekkolon)

## License

[MIT](https://choosealicense.com/licenses/mit/)

## Acknowledgements

- [iFrame Resizer](https://github.com/davidjbradshaw/iframe-resizer/)
This library is used to adjust the iframe's height automatically.

[npm-image]: https://img.shields.io/npm/v/@ekkolon/ngx-gist.svg
[npm-url]: https://npmjs.org/package/@ekkolon/ngx-gist