Skip to content

Instantly share code, notes, and snippets.

@ro0gr
Created December 8, 2016 08:10
Show Gist options
  • Select an option

  • Save ro0gr/55f155a2848e0a64f2836180cd54e773 to your computer and use it in GitHub Desktop.

Select an option

Save ro0gr/55f155a2848e0a64f2836180cd54e773 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
urlParams: ['many-params', 1, 2]
});
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('many-params', {path: 'many-params/:p1/:p2'});
});
export default Router;
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
{{#link-to 'many-params' 1 2}}
Go to Many params (with explicit params)
{{/link-to}}
<br />
{{#link-to params=urlParams}}
Go to Many params (with params in array)
{{/link-to}}
{
"version": "0.10.6",
"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.9.0",
"ember-data": "2.9.0",
"ember-template-compiler": "2.9.0",
"ember-testing": "2.9.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment