made with esnextbin
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'; | |
import gql from 'graphql-tag' | |
const query = gql` | |
query pokedex { | |
pokedex { | |
pokemon(start: 0 number: 10) {edges {node {id 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'; | |
import { | |
times, | |
constant | |
} from 'lodash'; | |
const { | |
get, | |
set, | |
Component, |
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'; | |
const { | |
Component, | |
on, | |
computed, | |
A: EArray, | |
} = Ember; | |
export default Component.extend({ |
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: { | |
sumText: 'sum text', | |
}, | |
actions: { | |
changed() { | |
alert('onChange triggered') |
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', | |
actions: { | |
foo() { | |
alert('red box') | |
}, | |
bar(ev) { |
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
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Event; | |
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | |
class EventServiceProvider extends ServiceProvider | |
{ |
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' | |
const { Component } = Ember | |
export default Component.extend({ | |
// props | |
availableItems: undefined, | |
selectedItem: undefined, | |
onSelectItem: undefined, | |
}) |
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' | |
const { Component } = Ember | |
export default Component.extend({ | |
// properties | |
options: undefined, | |
selectedOption: undefined, | |
onChange: undefined, | |
}) |
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
export const once = (func: Function): Function => { | |
let called = false | |
let cachedValue = undefined | |
return (...args) => { | |
if (!called) { | |
cachedValue = func(...args) | |
called = true | |
} | |
return cachedValue | |
} |
OlderNewer