Skip to content

Instantly share code, notes, and snippets.

@Turbo87
Created December 21, 2016 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Turbo87/d8c8c1f590175dd465e3191c44a2b6c4 to your computer and use it in GitHub Desktop.
Save Turbo87/d8c8c1f590175dd465e3191c44a2b6c4 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
foo: 1,
actions: {
inc() {
this.set('foo', this.get('foo') + 1);
}
}
});
<h1>Welcome to {{appName}}</h1>
{{#active-link}}
{{link-to foo "index" title=foo}}
{{/active-link}}
<button {{action "inc"}}>+1</button>
<br>
<br>
{{outlet}}
<br>
<br>
{
"version": "0.10.7",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.10.0",
"ember-data": "2.10.0",
"ember-template-compiler": "2.10.0",
"ember-testing": "2.10.0"
},
"addons": {
"ember-cli-active-link-wrapper": "0.3.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment