<commit_before># Ember-dynamic-component

An Ember CLI addon to render a dynamic component.

## Note

This is a work in progress, it will be published to NPM shortly (once I've written some tests).

## Using

### Installation

Install this addon via npm:

```
npm install --save-dev ember-dynamic-component
```

### Usage

Give the `{{dynamic-component}}` helper a type with the name of the component to render, and as that property
changes then the correct component will be rendered:

```handlebars
{{dynamic-component type=theType}}
```

Any other properties and actions given to the helper will be passed through to the underlying component:

```handlebars
{{dynamic-component
  type=theType
  boundProperty=foo
  staticProperty="bar"
  onFoo="fooTriggered"
}}
```

## Developing

### Installation

* `git clone` this repository
* `npm install`
* `bower install`

### Running

* `ember server`
* Visit your app at http://localhost:4200.
<commit_msg>add another example to the README<commit_after># Ember-dynamic-component

An Ember CLI addon to render a dynamic component.

## Note

This is a work in progress, it will be published to NPM shortly (once I've written some tests).

## Using

### Installation

Install this addon via npm:

```
npm install --save-dev ember-dynamic-component
```

### Usage

Give the `{{dynamic-component}}` helper a type with the name of the component to render, and as that property
changes then the correct component will be rendered:

```handlebars
{{dynamic-component type=theType}}
```

Any other properties and actions given to the helper will be passed through to the underlying component:

```handlebars
{{dynamic-component
  type=theType
  boundProperty=foo
  staticProperty="bar"
  onFoo="fooTriggered"
}}
```

This means the following:

```
{{#if showFoo}}
  {{x-foo onClick="thingClicked" value=something}}
{{/if}}
{{#if showBar}}
  {{x-bar onClick="thingClicked" value=something}}
{{/if}}
{{#if showBaz}}
  {{x-baz onClick="thingClicked" value=something}}
{{/if}}
```

... is essentially the same as:

```
{{dynamic-component type=type onClick="thingClicked" value=something}}
```

## Developing

### Installation

* `git clone` this repository
* `npm install`
* `bower install`

### Running

* `ember server`
* Visit your app at http://localhost:4200.

{'fraction_non_alphanumeric': 0.12434782608695652, 'fraction_numerical': 0.0034782608695652175, 'mean_word_length': 4.7525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6104654', 'n_tokens_mistral': 716, 'n_tokens_neox': 679, 'n_words': 260}