Skip to content

Instantly share code, notes, and snippets.

@eneuhauser
Last active May 10, 2016 23: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 eneuhauser/b9a9a89dfdcf7a6bd5caefc021536c40 to your computer and use it in GitHub Desktop.
Save eneuhauser/b9a9a89dfdcf7a6bd5caefc021536c40 to your computer and use it in GitHub Desktop.
Bubble Example
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
foo() {
alert("I'm the application route");
}
}
});
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
foo() {
return confirm('Index route intercepted your action. Should it bubble to the application route?');
}
}
});
<h1>Application Template</h1>
<button {{ action 'foo' }}>Button on Application</button>
<br>
<br>
{{outlet}}
<br>
<br>
<h2>Index Template</h2>
{
"version": "0.8.0",
"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.5.1",
"ember-data": "2.5.2",
"ember-template-compiler": "2.5.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment