Skip to content

Instantly share code, notes, and snippets.

@MelSumner
Forked from sukima/controllers.application.js
Last active November 13, 2018 22:09
Show Gist options
  • Save MelSumner/02f5e7f733df6adde35009842dc1e598 to your computer and use it in GitHub Desktop.
Save MelSumner/02f5e7f733df6adde35009842dc1e598 to your computer and use it in GitHub Desktop.
table cell links semantic HTML
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
transitionToShow(routeName) {
this.transitionToRoute(routeName);
}
}
});
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
const Router = EmberRouter.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('foo');
this.route('bar');
});
export default Router;
td {
padding: 0;
border: thin solid black;
}
td a {
padding: 0 40px;
width: 100%;
height: 100%;
}
<h1>Welcome to {{appName}}</h1>
<table>
<tbody>
<tr>
<td>
{{link-to "Go to Foo" "foo"}}
</td>
<td>
{{link-to "Go to Bar" "bar"}}
</td>
</tr>
</tbody>
</table>
<p>{{outlet}}</p>
{
"version": "0.15.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "3.4.3",
"ember-template-compiler": "3.4.3",
"ember-testing": "3.4.3"
},
"addons": {
"ember-data": "3.4.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment