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 Ember.Component.extend({ | |
html: `<div> | |
<img src="https://via.placeholder.com/350x150" width="350" height="150" alt="Placeholder" /> | |
</div>`, | |
}); |
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 Ember.Controller.extend({ | |
appData : { | |
"title" : "First Title", | |
"subtitles": [ | |
{ | |
"AMount":"4343" | |
}, | |
{ |
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
// Try to be as sensible as possible about parsing durations | |
function parseDuration(duration) { | |
// .75 | |
if (match = /^\.\d+$/.exec(duration)) { | |
return parseFloat("0" + match[0]) * 3600; | |
// 4 or 11.75 | |
} else if (match = /^\d+(?:\.\d+)?$/.exec(duration)) { | |
return parseFloat(match[0]) * 3600; | |
// 01:34 | |
} else if (match = /^(\d+):(\d+)$/.exec(duration)) { |