# UIB DynamicViewModule

## Prequisites

Add the `DynamicViewModule` module to your module imports:

```TS
import { DynamicViewModule } from '@uib/angular';

@NgModule({
  imports: [
    DynamicViewModule,
  ],
})
// ...
```

## UibDynamicViewDirective

### Examples

#### Render HTML string content

```HTML
<ng-template uibDynamicView="<b>HTML</b> content">
</ng-template>
```

#### Rendering ng-template

```HTML
<ng-template let-c #tpl>
  An angular template with context: <b>{{ c }}</b>
</ng-template>
<ng-template [uibDynamicView]="tpl" [uibDynamicViewContext]="{ $implicit: 'My context' }">
</ng-template>
```

#### Rendering components

```HTML
<ng-template [uibDynamicView]="HeaderComponent" [uibDynamicViewContext]="{ title: 'Header title' }">
</ng-template>
```
