Skip to content

Instantly share code, notes, and snippets.

//In an onPush component a method called by constructor this code exists:
this.store.select('searchResultsGrid')
.map(results => results.visibleResultsCount)
.distinctUntilChanged()
.skip(1)
.subscribe(count => {
console.log('new count is ', count);
this.resultsCount = count;
@mikehaas763
mikehaas763 / WantedEs6ModuleLoading.js
Created June 10, 2015 14:48
How I'd like the consumption of ES6 modules to work.
// Hypothetically the contents of this is in a file located at 'myproject/lib/WantedEs6ModuleLoading.js
// located at 'myproject/lib/Earth/People/Person.js'
// notice that I do not have to specify 'lib/'
import Person from 'Earth/People/Person.js';
// located at 'myproject/node_modules/3dMathLib/Grids/CoordinatePlane.js';
// would work because in some way the loader knows 3dMathLib is a package in node_modules (could be configuration or whatever)
import CoordinatePlane from '3dMathLib/Grids/CoordinatePlane.js';
var builder = new Builder({
transpiler: 'babel',
baseURL: 'lib',
map: {
yolo: '/Users/mhaas2/projects/community/project/yolo.js'
}
});
@mikehaas763
mikehaas763 / designer.html
Created November 16, 2014 03:59
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;