Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
const titleImage = {src: 'http://placekitten.com/300/300'};
const optionImages = [
{src: 'http://placekitten.com/300/100'},
{src: 'http://placekitten.com/300/200'},
{src: 'http://placekitten.com/300/300'},
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
flowState: 'INTRO',
actions: {
startQuiz() {
this.set('flowState', 'QUIZ');
}
}
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
buttonClick() {
this.sendAction('buttonClick');
}
}
});
@1276stella
1276stella / components.my-component.js
Last active November 28, 2018 21:03
ComputedProperty
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
clickHandler() {
this.get('cards').removeAt(1);
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});
<!DOCTYPE html>
<html>
<head>
<script src='jquery.js'></script>
<script src="main.js"></script>
</head>
<body>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>