Skip to content

Instantly share code, notes, and snippets.

@elwayman02
Created March 16, 2020 21:39

Revisions

  1. elwayman02 created this gist Mar 16, 2020.
    3 changes: 3 additions & 0 deletions components.my-component\.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    import Component from '@ember/component';

    export default Component.extend({});
    5 changes: 5 additions & 0 deletions controllers.application\.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    import Controller from '@ember/controller';

    export default class ApplicationController extends Controller {
    appName = 'Ember Twiddle';
    }
    9 changes: 9 additions & 0 deletions templates.application\.hbs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <h1>Welcome to {{this.appName}}</h1>
    <br>
    {{#my-component}}
    <div>FOO</div>
    {{/my-component}}
    <br>
    {{outlet}}
    <br>
    <br>
    3 changes: 3 additions & 0 deletions templates.components.my-component\.hbs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    {{yield}}

    <div>BAR</div>
    23 changes: 23 additions & 0 deletions twiddle\.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    {
    "version": "0.17.0",
    "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.3.1/jquery.js",
    "ember": "3.8.3",
    "ember-template-compiler": "3.8.3",
    "ember-testing": "3.8.3"
    },
    "addons": {
    "@glimmer/component": "1.0.0",
    "ember-data": "3.8.1"
    }
    }