Skip to content

Instantly share code, notes, and snippets.

Avatar

Vincent Eberle veberle-CSD

View GitHub Profile
View controllers.application.js
import Ember from 'ember';
const { inject: { service } } = Ember;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
store: service(),
index: 0,
View components.my-component.js
import Component from '@ember/component';
import { computed } from '@ember/object';
import { copy } from '@ember/object/internals';
export default Component.extend({
data: null,
dataWithExtra: computed('data.{a,b,c}', {
get() {
View components.my-component.js
import Ember from 'ember';
const { computed: { reads } } = Ember;
export default Ember.Component.extend({
firstName: reads('job.firstName'),
lastName: reads('job.lastName'),
title: reads('job.title'),
View controllers.application.js
import Ember from 'ember';
const A = Ember.A;
const O = Ember.Object.create.bind(Ember.Object);
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
parents: A([
O({ children: [ O({name: "Alpha"}), O({name: "Bravo"}) ] }),
View keybase.md

Keybase proof

I hereby claim:

  • I am veberle-csd on github.
  • I am veberlecsd (https://keybase.io/veberlecsd) on keybase.
  • I have a public key ASBGsZnsp6nidh_qQdZj5bBlA2Z6F47d1-q4QtbmiDKwBwo

To claim this, I am signing this object:

View controllers.application.js
import Ember from 'ember';
const featuredImage = {url: '//via.placeholder.com/600x400.png'};
export default Ember.Controller.extend({
articles: [
{title: 'foobar 1', featuredImage},
{title: 'foobar 2', featuredImage},
{title: 'foobar 3', featuredImage},
{title: 'foobar 4', featuredImage},
View controllers.application.js
import Ember from 'ember';
const { computed } = Ember;
const { gt } = computed;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
now: new Date(),
dateInMay: new Date(2017, 4, 10),