Skip to content

Instantly share code, notes, and snippets.

@SaladFork
Created February 24, 2016 01:23
Show Gist options
  • Save SaladFork/ce0bac61a6567bf9c148 to your computer and use it in GitHub Desktop.
Save SaladFork/ce0bac61a6567bf9c148 to your computer and use it in GitHub Desktop.
EmberJS: Outlet in Component
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
{{#link-to 'a'}}a{{/link-to}} |
{{#link-to 'b'}}b{{/link-to}}
{{component-with-outlet}}
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none'
});
Router.map(function() {
this.route('a');
this.route('b');
});
export default Router;
{
"version": "0.6.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.3.1/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.3.3/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment