Skip to content

Instantly share code, notes, and snippets.

View moro-programmer's full-sized avatar

moro-programmer moro-programmer

View GitHub Profile
@jhiemer
jhiemer / homeController.js
Last active December 13, 2015 23:49
Testing Controller and Services with require.js and Angular
/**
* HomeController
**/
define(function () {
'use strict';
function HomeController($scope, homeService) {
$scope.variable = 'empty';
@lencioni
lencioni / AsyncComponent.jsx
Created January 8, 2017 17:09
<AsyncComponent> at Airbnb used for Webpack code splitting
// Usage:
//
// function loader() {
// return new Promise((resolve) => {
// if (process.env.LAZY_LOAD) {
// require.ensure([], (require) => {
// resolve(require('./SomeComponent').default);
// });
// }
// });