Skip to content

Instantly share code, notes, and snippets.

@Kilowhisky
Created October 7, 2015 14:35
Show Gist options
  • Save Kilowhisky/841b6988c1d1767065a5 to your computer and use it in GitHub Desktop.
Save Kilowhisky/841b6988c1d1767065a5 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{#link-to 'files' 'file1'}}File 1{{/link-to}}
{{#link-to 'files' 'file2'}}File 2{{/link-to}}
{{outlet}}
<br>
<br>
import Ember from 'ember';
export default Ember.Route.extend({
model(params){
return null;
}
});
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('files', {path: '/files/:file_id'});
});
export default Router;
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
a{
display:block;
}
a.active{
background-color: red;
}
{
"version": "0.4.11",
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.9/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/1.13.11/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.9/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment