Skip to content

Instantly share code, notes, and snippets.

@MiguelMadero
Created February 1, 2017 23:14
Show Gist options
  • Save MiguelMadero/44bb46b85e43b26e976cb5537538a63f to your computer and use it in GitHub Desktop.
Save MiguelMadero/44bb46b85e43b26e976cb5537538a63f to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('test');
this.route('test2');
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
beforeModel () {
console.log('beforeModel');
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{#link-to "test"}}test{{/link-to}}
{{#link-to "test2"}}test2{{/link-to}}
<br>
<br>
{
"version": "0.11.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "1.13.13",
"ember-data": "2.11.0",
"ember-template-compiler": "1.13.13",
"ember-testing": "1.13.13"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment