Skip to content

Instantly share code, notes, and snippets.

@rohmann
Created June 1, 2016 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohmann/3853e6816392fcebddcb4a117992823a to your computer and use it in GitHub Desktop.
Save rohmann/3853e6816392fcebddcb4a117992823a to your computer and use it in GitHub Desktop.
Embed Path
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: 'embed-path'
});
Router.map(function() {
this.route('first-route');
this.route('second-route');
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
});
<ul>
<li>{{link-to 'Back to Home' 'application' }}</li>
<li>{{link-to 'First Route' 'first-route' }}</li>
<li>{{link-to 'Second Route' 'second-route' }}</li>
</ul>
{{outlet}}
<h2>You are on the first route.</h2>
<h2>You are on the second route.</h2>
{
"version": "0.8.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "beta",
"ember-data": "2.5.2",
"ember-template-compiler": "beta"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment