Skip to content

Instantly share code, notes, and snippets.

@Gaurav0
Last active March 8, 2016 05:57
Show Gist options
  • Save Gaurav0/7a76bc51aa5c4310a7c8 to your computer and use it in GitHub Desktop.
Save Gaurav0/7a76bc51aa5c4310a7c8 to your computer and use it in GitHub Desktop.
Select Flower
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
selectFlower() {
alert('clicked');
}
}
});
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
});
export default Router;
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
<div id="flowers-list">
<ul class="flowers">
<li class="flower1">
<a href="#/" {{action "selectFlower" "rose"}}>Rose</a>
</li>
</ul>
</div>
{
"version": "0.4.0",
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.5/ember.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/1.13.5/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.5/ember-template-compiler.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment