Skip to content
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.

Commit

Permalink
Merge pull request #48 from ppcano/extend-glimmer-readme
Browse files Browse the repository at this point in the history
Added `Glimmer` component example to Readme
  • Loading branch information
rwjblue authored Feb 22, 2019
2 parents 5aeecbc + 9a4070e commit e76e18b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,35 @@ Included:
- ember-auto-import
- no jquery

### Glimmer Component Example

```src/ui/components/counter/component.js
import Component from '@ember/component';
import { tracked } from '@glimmer/tracking';

export default class HolaComponent extends Component {
@tracked count = 0;

increment() {
this.count++;
}

decrement() {
this.count--;
}
}

```

```src/ui/components/counter/template.hbs
Count: {{this.count}}
<br/>
<button {{action this.increment}}>Click to increase</button>
<button {{action this.decrement}}>Click to decrease</button>
```


## Building/Contributing:
```bash
Expand Down

0 comments on commit e76e18b

Please sign in to comment.