Skip to content

Instantly share code, notes, and snippets.

@machty
Last active March 19, 2018 19:16
Show Gist options
  • Save machty/154236139c20bbc421115d723bc32396 to your computer and use it in GitHub Desktop.
Save machty/154236139c20bbc421115d723bc32396 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('a', function() {
this.route('b', function() {
this.route('c', function() {
});
});
});
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
renderTemplate(controller, model) {
// debugger;
// yuno work and re-render entire screen w nothing?
this.render('a-header', {
into: 'application',
outlet: 'header',
});
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
<div>\{{outlet 'header'}}: {{outlet 'header'}}</div>
<div>\{{outlet 'footer'}}: {{outlet 'footer'}}</div>
<h1>Links</h1>
{{link-to 'a' 'a'}}
{{link-to 'a.b' 'a.b'}}
{{link-to 'a.b.c' 'a.b.c'}}
{
"version": "0.13.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": "2.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment