This file contains hidden or 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 hbs from 'htmlbars-inline-precompile'; | |
import { connect } from 'ember-redux'; | |
const stateToComputed = state => { | |
return { | |
name: state.data.name, | |
loading: state.data.loading | |
}; | |
}; |
This file contains hidden or 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 hbs from 'htmlbars-inline-precompile'; | |
import { connect } from 'ember-redux'; | |
const stateToComputed = state => { | |
return { | |
number: state.saga.number, | |
loading: state.saga.loading | |
}; | |
}; |
This file contains hidden or 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 * as types from '../actions/types'; | |
export const addTodo = text => dispatch => dispatch({type: types.ADD_TODO, text}); | |
export const deleteTodo = id => dispatch => dispatch({type: types.DELETE_TODO, id}); | |
export const editTodo = (id, text) => dispatch => dispatch({type: types.EDIT_TODO, id, text}); | |
export const completeTodo = id => dispatch => dispatch({type: types.COMPLETE_TODO, id}); | |
export const clearCompleted = () => dispatch => dispatch({type: types.CLEAR_COMPLETED}); | |
export const showAll = () => dispatch => dispatch({type: types.SHOW_ALL}); | |
export const showActive = () => dispatch => dispatch({type: types.SHOW_ACTIVE}); | |
export const showCompleted = () => dispatch => dispatch({type: types.SHOW_COMPLETED}); |
This file contains hidden or 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
https://u716525.dl.dropboxusercontent.com/u/716525/images/toranbillups.png |
This file contains hidden or 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 hbs from 'htmlbars-inline-precompile'; | |
import { connect } from 'ember-redux'; | |
const stateToComputed = state => { | |
return { | |
number: state.number | |
}; | |
}; |
This file contains hidden or 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.Helper.helper(function(params) { | |
var reviews = params[0] || []; | |
var total = reviews.map((review) => { | |
return review.rating; | |
}).reduce((prev, next) => { | |
return prev + next; | |
}); | |
var fullStars = Math.floor(total / reviews.length); |
This file contains hidden or 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 hbs from 'htmlbars-inline-precompile'; | |
import { connect } from 'ember-redux'; | |
var stateToComputed = (state) => { | |
return { | |
number: state.number | |
}; | |
}; |
This file contains hidden or 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 hbs from 'htmlbars-inline-precompile'; | |
const createStore = (reducer) => { | |
var pointer = 0; | |
var state = []; | |
var listeners = []; | |
var firstState = reducer(); | |
state.push(firstState); | |
var store = { |
This file contains hidden or 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 hbs from 'htmlbars-inline-precompile'; | |
import connect from 'ember-redux/components/connect'; | |
var stateToComputed = (state) => { | |
return { | |
number: state.number | |
}; | |
}; |
This file contains hidden or 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 hbs from 'htmlbars-inline-precompile'; | |
const createStore = (reducer) => { | |
var pointer = 0; | |
var state = []; | |
var listeners = []; | |
var firstState = reducer(); | |
state.push(firstState); | |
var store = { |