Skip to content

Instantly share code, notes, and snippets.

View timkindberg's full-sized avatar

Tim Kindberg timkindberg

View GitHub Profile
@timkindberg
timkindberg / app.js
Last active October 25, 2015 07:12
ng-forward ng1 migration (part 1)
import { componentAModule } from './component-a';
angular.module('app', [componentAModule]);
@timkindberg
timkindberg / app.js
Created October 22, 2015 18:28
ng-forward ng1 migration (part 2)
import { componentAModule } from './component-a';
angular.module('app', [componentAModule]);
@timkindberg
timkindberg / app.js
Last active October 22, 2015 18:04
ng-forward ng1 migration (before)
angular.module('app', []);
@timkindberg
timkindberg / mockDirective.js
Last active August 29, 2015 14:26
Quickly Mock Child Components
export function mockDirective(...names) {
return angular.mock.module(($compileProvider) => {
names.forEach((name) => {
$compileProvider.directive(name, () => {
return {
priority: 9999,
terminal: true,
restrict: 'EAC',
template:`<mock-${dashCase(name)}></mock-${dashCase(name)}>`,
replace: true