View remove_cell_outputs.sh
local FILE | |
FILE=${1} | |
jq -r --indent 1 '. + { "cells": .cells | |
| map(. + | |
(if .cell_type == "code" then { "outputs": [], "execution_count": null } else {} end) | |
) }' "${FILE}" |
View controllers.application.js
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember.get() vs this.get() vs object.property', | |
emObj: null, | |
pojo: { | |
y: { | |
m: 'pojo' | |
} | |
}, |
View application.controller.js
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Notifying a property change on a property passed into a child component', | |
description: 'There is a parent component with some buttons. When a user clicks on a button, the buttons\'s action changes the property. Since the changed property is passed into the wrapped component, you would expect that it\'s observer would fire also. But it does not. To try this, just type in 1233 and you will see that the last 3 will not render.' | |
}); |
View components.some-component.js
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
someCondition: false, | |
componentName: 'some-component', | |
changeCondition: function() { | |
console.log(this.get('componentName') + ' on did insert element'); | |
setTimeout(() => { | |
this.set('someCondition', true); |
View components.user-profile.js
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
needs: ['users'], | |
moods: [], | |
name: Ember.computed.reads('user.name'), | |
userId: Ember.computed.reads('user.userId'), | |
showInfo: false, | |
status: Ember.computed.mapBy('moods', 'status'), | |
isLoading: false, |