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 Twiddle' | |
| }); |
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 Twiddle' | |
| }); |
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({ | |
| tagName: 'iframe', | |
| attributeBindings: ['sandbox','src'], | |
| src: Ember.computed(function(){ | |
| return ''; | |
| }), | |
| sandbox: 'allow-scripts allow-same-origin allow-popups allow-top-navigation allow-forms', | |
| didRender() { | |
| const doc = this.$()[0].contentDocument || this.$()[0].contentWindow.document; |
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 DS from 'ember-data'; | |
| import Ember from 'ember'; | |
| const {get, A, isArray} = Ember; | |
| export default DS.JSONAPIAdapter.extend({ | |
| host: 'http://mysite.com/data', | |
| pathMap: { | |
| 'query:partner-video': 'wm2/get_videos', | |
| 'query:partner-payment': 'wm2/get_payments', | |
| 'findAll:partner-video': 'wm2/get_videos', | |
| 'updateRecord:partner-video': 'wm2/set_file_info', |
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 DS from 'ember-data'; | |
| import ClubSerializer from '../serializers/application'; | |
| export default ClubSerializer.extend({ | |
| extractAttributes(modelClass, resourceHash) { | |
| var attributes = {}; | |
| resourceHash['origin'] = resourceHash.video_id; | |
| resourceHash['file-name'] = resourceHash.file; | |
| resourceHash['thumbnail-offset'] = resourceHash.img; | |
| resourceHash['duration'] = resourceHash.len_val; |
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
| function getArgs(fn) { | |
| const str = fn.toString(); | |
| return str | |
| .slice(str.indexOf('(')+1,str.indexOf(')')) | |
| .split(',') | |
| .map(e=>e.trim()); | |
| }; |
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 Twiddle', | |
| a: 1, | |
| b: 2, | |
| c: 3, | |
| d: Ember.computed('a','b','c',function(){ | |
| return this.get('a')+this.get('b')+this.get('c'); | |
| }) |
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 Twiddle1', | |
| a: 3, | |
| b: 4, | |
| c: 5, | |
| d: Ember.computed('a','b','c', function(){ | |
| return this.get('a') + this.get('b') + this.get('c'); | |
| }), |
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({ | |
| input: '', | |
| output: "", | |
| spaceReplacement: "{+}", | |
| newLine: "\n", | |
| inputObserver: Ember.observer('input', function() { | |
| const input = this.get('input'); | |
| const newLine = this.get('newLine'); |
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
| function parent(propName) { | |
| return function() { | |
| if (!propName) { | |
| return `parent`; | |
| } | |
| return `parent.${propName}`; | |
| } | |
| } | |
| function isSignal(nodeValue) { |
OlderNewer