application.js
//= stub ./vendor/moment.min.js
Mixin
App.EmberGraphs = Em.Mixin.create({
getEgApi: function() {
var _this = this,
url = '/assets/vendor/ember-graphs.min.js';
$.getScript(url).done(function() {
_this._egCallback();
});
}.on('willInsertElement'),
_egCallback: function() {
// Empty function to override in the view
}
});
View
App.StatsView(
App.EmberGraphs, {
_egCallback: function() {
// Optional override logic here
},
});