Skip to content

Instantly share code, notes, and snippets.

@GavinJoyce
Created March 25, 2019 15:39
Show Gist options
  • Select an option

  • Save GavinJoyce/f2837fe678e92e6ee3a1accd8e792deb to your computer and use it in GitHub Desktop.

Select an option

Save GavinJoyce/f2837fe678e92e6ee3a1accd8e792deb to your computer and use it in GitHub Desktop.

Revisions

  1. GavinJoyce created this gist Mar 25, 2019.
    16 changes: 16 additions & 0 deletions controllers.application.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    import Ember from 'ember';

    export default Ember.Controller.extend({
    appName: 'Ember Twiddle',

    actions: {
    changeCursorPosition(e) {
    debugger;
    console.log('change', e);
    },

    resetCursorPosition() {
    console.log('reset');
    }
    }
    });
    8 changes: 8 additions & 0 deletions templates.application.hbs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    <h1>Welcome to {{appName}}</h1>
    <br>
    <br>
    {{outlet}}
    <br>
    <br>

    {{input value=query key-up=(action 'changeCursorPosition') blur='resetCursorPosition'}}
    19 changes: 19 additions & 0 deletions twiddle.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    {
    "version": "0.15.1",
    "EmberENV": {
    "FEATURES": {}
    },
    "options": {
    "use_pods": false,
    "enable-testing": false
    },
    "dependencies": {
    "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
    "ember": "3.4.3",
    "ember-template-compiler": "3.4.3",
    "ember-testing": "3.4.3"
    },
    "addons": {
    "ember-data": "3.4.2"
    }
    }