This is a very trivial example of using mirage with Ember Twiddle.
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({ | |
name: '', | |
renderCount: 0, | |
didRender() { | |
this.set('renderCount', this.renderCount++); | |
console.log(`did render!!! ${this.name}`); | |
} |
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({ | |
appName: 'Ember Twiddle', | |
model: { | |
id: 1 | |
}, | |
observe: Ember.observer('model.id', function() { |
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
Debugger entered--Lisp error: (invalid-function with-helm-buffer) | |
with-helm-buffer(t) | |
helm--turn-on-linum-relative() | |
run-hooks(helm-after-initialize-hook) | |
helm-log-run-hook(helm-after-initialize-hook) | |
helm-initial-setup(nil) | |
helm-initialize(noresume nil nil (((nomark) (name . "Emacs Commands History") (candidates . #[0 "\304\302\300\305\303$\211\205 \306\307\310\301\"\"\207" [commandp nil ("set-variable" "spacemacs/home" "helm-multi-swoop-all" "minibuffer-force-complete-and-exit" "minibuffer-force-complete" "evil-surround-region" "indent-according-to-mode" "evil-scroll-line-to-center" "ibuffer" "projectile-run-command-in-root" "projectile-run-eshell" "query-replace" "customize-set-variable" "make-variable-buffer-local" "indent-guide-global-mode" "indent-new-comment-line" "indent-relative-maybe" "indent-rigidly" "indent-to" "dtrt-indent-mode" "evil-indent" "replace-string" "evil-jump-backward" "avy-pop-mark" "configuration-layer/update-packages" "new-frame" "evil-scroll-page-down" "spacemacs/scro |
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'; | |
function latestProperty(dependentKeyA, dependentKeyB, latestWin = false) { | |
let aTimestamp, bTimestamp; | |
aTimestamp = bTimestamp = + new Date(); | |
let aCache, bCache; | |
return Ember.computed(dependentKeyA, dependentKeyB, function() { | |
let currentA = Ember.get(this, dependentKeyA); | |
let currentB = Ember.get(this, dependentKeyB); | |
let timestamp = + new Date(); |
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({ | |
value: '', | |
collectedValues: [], | |
actions: { | |
keyUp(event) { | |
this.set('value', event.target.value); | |
// if enter |
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({ | |
store: Ember.inject.service(), | |
init() { | |
this._super(...arguments); | |
this.set('isLoading', true); | |
this.get('store').cachedStories(700).then((stories) => { | |
this.set('stories', stories); |
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({ | |
appName: 'Ember Twiddle' | |
}); |
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({ | |
appName: 'Ember Twiddle', | |
init() { | |
this._super(...arguments); | |
this.get('store').pushPayload('my-model', { | |
data: { |
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({ | |
appName: 'Ember Twiddle' | |
}); |
NewerOlder