Skip to content

Instantly share code, notes, and snippets.

<?php
echo "<option>Knoxville</option>";
?>
@cvbuelow
cvbuelow / README.md
Last active August 29, 2015 14:13
i18n in Angular

Internationalization

The i18n library is an AngularJS module composed of services and filters used to easily internationalize applications.


Configuring

setLocale(locale)

@cvbuelow
cvbuelow / reducers.js
Last active July 25, 2019 11:10 — forked from gaearon/reducers.js
Code splitting in Redux with SSR
import { combineReducers } from 'redux';
import users from './reducers/users';
import posts from './reducers/posts';
// Inject the initial state for async loaded reducers
function injectState(reducers, preloadedState = {}) {
return Object.keys(reducers).reduce((finalReducers, key) => {
if (typeof reducers[key] === "function") {
finalReducers[key] = (state = preloadedState[key], action) => reducers[key](state, action);
}