Last active
April 18, 2017 02:39
-
-
Save blainelang/fadd14a7cb185e2f69df6a1ef565f71c to your computer and use it in GitHub Desktop.
Ember Bootstrap Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
save() { | |
console.log('components/add-record-modal action - save!'); | |
this.sendAction('save'); | |
}, | |
actionTest() { | |
console.log('components/add-record-modal action - actionTest!'); | |
this.sendAction('actionTest'); | |
}, | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Bootstrap Twiddle', | |
actions: { | |
save() { | |
console.log('controllers/application action - save!'); | |
this.send('routeActionTest'); // Fire Action on Route | |
}, | |
actionTest() { | |
console.log('controllers/application action - actionTest!'); | |
this.send('routeActionTest'); // Fire Action on Route | |
}, | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
save() { | |
console.log('controllers/index action - save!'); | |
}, | |
actionTest() { | |
console.log('controllers/index action - actionTest!'); | |
this.send('RouteActionTest'); // Fire Action on Route | |
}, | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
actions: { | |
save() { | |
console.log('routes/index action - save!'); | |
}, | |
routeActionTest() { | |
console.log('routes/index action - RouteActionTest!'); | |
}, | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.12.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": "2.11.2", | |
"ember-template-compiler": "2.11.2", | |
"ember-testing": "2.11.2" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-bootstrap": "1.0.0-alpha.10" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment