Skip to content

Instantly share code, notes, and snippets.

@jas7457
Last active August 4, 2021 18:12
Show Gist options
  • Save jas7457/7331b8b6651acac2860ac95d6bf058fe to your computer and use it in GitHub Desktop.
Save jas7457/7331b8b6651acac2860ac95d6bf058fe to your computer and use it in GitHub Desktop.
New Twiddle
<div style="border: 1px solid black; padding: 10px;">
<p>Create a simple counter that counts up when you click "Count Up" and counts down when you click "Count Down"</p>
Counter: 0
<div>
<button>Count Down</button>
<button>Count Up</button>
</div>
</div>
import Component from '@glimmer/component';
export default class CounterComponent extends Component {
}
<div style="border: 1px solid black; padding: 10px;">
<p>Create a to do list that lets you add and remove items from the list. When one is added, clear the input.</p>
<form>
{{! Put your input in this form }}
</form>
<ul>
{{! Put your todos in this list }}
</ul>
</div>
import Component from '@glimmer/component';
export default class TodosComponent extends Component {
}
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {}
<Counter />
<div style="height: 50px;"></div>
<Todos />
{
"version": "0.17.1",
"EmberENV": {
"FEATURES": {},
"_TEMPLATE_ONLY_GLIMMER_COMPONENTS": false,
"_APPLICATION_TEMPLATE_WRAPPER": true,
"_JQUERY_INTEGRATION": true
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js",
"ember": "3.18.1",
"ember-template-compiler": "3.18.1",
"ember-testing": "3.18.1"
},
"addons": {
"@glimmer/component": "1.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment