# angular-dynamic-interpolation

> A simple library that replaces string placeholders with angular ng-templates.

Latest version **0.0.2** (published 2022-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-dynamic-interpolation
pnpm add angular-dynamic-interpolation
yarn add angular-dynamic-interpolation
bun add angular-dynamic-interpolation
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-05-06 |
| First published | 2022-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 69.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gwcult |

## Links

- npm: https://www.npmjs.com/package/angular-dynamic-interpolation
- npm.io page: https://npm.io/package/angular-dynamic-interpolation

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.3.0

## Recent versions

- 0.0.2 (latest) — 2022-05-06
- 0.0.1 — 2022-05-05

## README

# Angular Dynamic Interpolation

A simple library that replaces string placeholders with angular ng-templates.

## Requirements

Angular 13+

## Example

```html
<!-- components.html -->

<dip-interpolation [template]="'FOO {{ BUTTON }} BAR'">
  <button *dipReplacement="'BUTTON'">FOOBAR</button>
</dip-interpolation>

<!-- result -->
FOO <button>FOOBAR</button> BAR
```

## Configuration

```js
//module.ts

@NgModule({
    ...
    imports: [
        ...
        DynamicInterpolationModule.forRoot({
            //Placeholder names should be matched in regex group
            //The following example will match e.g. %%VARIABLE%%
            regex: /%%(.*?)%%/
        })
    ]
})

```

---
_Source: https://npm.io/package/angular-dynamic-interpolation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
