This file contains 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 FlashMessagesService from 'ember-cli-flash/services/flash-messages-service'; | |
export function initialize(_container, application) { | |
application.register('service:flash-messages', FlashMessagesService, { singleton: true }); | |
application.inject('controller', 'flashes', 'service:flash-messages'); | |
application.inject('route', 'flashes', 'service:flash-messages'); | |
} | |
export default { | |
name: 'flash-messages-service', |
This file contains 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'; | |
import youtube from 'ember-lazy-video/lazy-video-providers/youtube'; | |
import vimeo from 'ember-lazy-video/lazy-video-providers/vimeo'; | |
export default Ember.Object.extend({ | |
getUrl: function(provider, endpoint, videoId, opts) { | |
var params; | |
opts = (typeof opts === "undefined") ? {} : opts; | |
params = Ember.$.param(opts); | |
return this.get(provider)[endpoint](videoId) + '?' + params; |
This file contains 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 { | |
apiUrl: function(videoId) { | |
return '//vimeo.com/api/oembed.json?url=http%3A//vimeo.com/' + videoId; | |
}, | |
embedUrl: function(videoId) { | |
return '//player.vimeo.com/video/' + videoId; | |
}, | |
thumbnailUrl: function(videoId) { |
This file contains 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 { | |
apiUrl: function(videoId) { | |
return '//gdata.youtube.com/feeds/api/videos/' + videoId; | |
}, | |
embedUrl: function(videoId) { | |
return '//www.youtube.com/embed/' + videoId; | |
}, | |
thumbnailUrl: function(videoId) { |
This file contains 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 LazyVideoProviders from 'ember-lazy-video/services/lazy-video-providers'; | |
export default { | |
name: 'lazy-video', | |
initialize: function(container, application){ | |
application.register('service:lazy-video-providers', LazyVideoProviders, { singleton: true }); | |
application.inject('component:lazy-video', 'providers', 'service:lazy-video-providers'); | |
} | |
}; |
This file contains 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'; | |
var computed = Ember.computed; | |
var get = Ember.get; | |
export default Ember.Object.extend({ | |
fullName: computed('firstName', 'lastName', function() { | |
return get(this, 'firstName') + ' ' + get(this, 'lastName'); | |
}) | |
}); |
This file contains 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'; | |
var computed = Ember.computed; | |
var get = Ember.get; | |
export default Ember.Object.extend({ | |
fullName: computed('firstName', 'lastName', function() { | |
return get(this, 'firstName') + ' ' + get(this, 'lastName'); | |
}), | |