I hereby claim:
- I am psdcoder on github.
- I am psdcoder (https://keybase.io/psdcoder) on keybase.
- I have a public key ASAWIbcPbJjxBuE3DFILkJM9Ufr_ejNbFJfFgYHLVYeFLAo
To claim this, I am signing this object:
| function pad(lvl) { | |
| return ' '.repeat(2 * lvl); | |
| } | |
| function buildGraphStructure(data, lvl = 0) { | |
| return Object.keys(data).reduce((acc, key) => { | |
| if (data[key]) { | |
| return ( | |
| acc + | |
| `${pad(lvl)}${key} {\n` + |
I hereby claim:
To claim this, I am signing this object:
| //from https://medium.com/@kentcdodds/counting-angularjs-watchers-11c5134dc2ef | |
| function getWatchers(root) { | |
| root = angular.element(root || document.documentElement); | |
| var watcherCount = 0; | |
| function getElemWatchers(element) { | |
| var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
| var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
| var watchers = scopeWatchers.concat(isolateWatchers); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="http://static.jsbin.com/js/vendor/traceur.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| <link href='http://fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet' type='text/css'> | |
| <style id="jsbin-css"> | |
| @font-face { | |
| font-family: 'icomoon'; |
| (function () { | |
| 'use strict'; | |
| angular | |
| .module('$MODULE_NAME$') | |
| .config($COMPONENT$Initialization); | |
| function $COMPONENT$Initialization() { | |
| $END$ | |
| } |
A Pen by Pavel Grinchenko on CodePen.
| <!DOCTYPE html> | |
| <html ng-app="app"> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
| </head> | |
| <body ng-controller="ParentCtrl"> | |
| <test-directive> | |
| <p>Some content <br> {{ test }} </p> | |
| </test-directive> | |
| <script> |
| <!DOCTYPE html> | |
| <html ng-app="app"> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular-route.js"></script> | |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.10/angular-ui-router.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> |
| var util = require('util'); | |
| function BaseClass(data) { | |
| if (!data) { | |
| throw new TypeError('You must pass "data" in constructor'); | |
| } | |
| console.log('base constructor'); | |
| this.data = data; | |
| } |