+
+ {{#each @items as |item index|}}
+ Item #{{plusOne index}}: {{item}}
+ {{/each}}
+
+
+```
+
+Finally, to associate a template with a class-based component, you can use the
+template syntax directly in the class body:
+
+```text {data-filename="components/hello.gjs"}
+import Component from '@glimmer/component';
+import { tracked } from '@glimmer/tracking';
+import { on } from '@ember/modifier';
+
+export default class Hello extends Component {
+ @tracked count = 0;
+
+ increment = () => {
+ this.count += 1;
+ };
+
+ decrement = () => {
+ this.count -= 1;
+ };
+
+