This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example of using an angular provider to build an api service. | |
* @author Jeremy Elbourn (@jelbourn) | |
*/ | |
/** Namespace for the application. */ | |
var app = {}; | |
/******************************************************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var module = angular.module('test', []); | |
// Simple directive lets you use polymorphism. | |
module.directive('filter', function() { | |
return { | |
scope: {filter: '=filter'}, | |
template: '<div ng-include="filter.url"></div>' | |
}; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Overlays one color on top of another and returns the resulting color. | |
// This is used to determine contrast ratio for two colors with partial opacity. | |
// See http://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending | |
@function alpha-blend($overlay, $base) { | |
$overlayAlpha: alpha($overlay); | |
$baseAlpha: alpha($base); | |
// If the overlaid color is completely opaque, then the result is just going to be that color. | |
@if $overlayAlpha >= 1 { | |
@return $overlay; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$md-red: ( | |
50: #ffebee, | |
100: #ffcdd2, | |
200: #ef9a9a, | |
300: #e57373, | |
400: #ef5350, | |
500: #f44336, | |
600: #e53935, | |
700: #d32f2f, | |
800: #c62828, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The "modifier", such as '.md-primary' or '.md-fab' is applied to the | |
// *host* element, but the style actually needs to be applied to an element | |
// within the shadow root. We can use a mixin to cover both native shadow DOM | |
// and emulated / polyfilled shadow DOM at the same time. | |
// Base mixin for general use. | |
@mixin host-context($element, $modifier, $target) { | |
:host(#{$modifier}) #{$target}, | |
#{$element}#{$modifier} #{$target} { | |
@content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var us = document.createElement('script'); | |
us.src = 'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'; | |
document.body.appendChild(us); | |
setTimeout(() => { | |
window.palettes = {}; | |
_.each(document.querySelectorAll('.color-group:not(:last-child)'), (group) => { | |
var nameElement = group.querySelector('.name'); | |
if (!nameElement) return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
NgModule, | |
Component, | |
Directive, | |
ViewContainerRef, | |
ViewChild, | |
ComponentFactoryResolver, | |
} from '@angular/core'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export declare class MapBrand { private _x; } | |
export declare class FilterBrand { private _x; } | |
export declare class ReduceBrand { private _x; } | |
export type mapOperator<T, R> = typeof map & MapBrand; | |
export type filterOperator<T> = typeof filter & FilterBrand; | |
export type reduceOperator<T> = typeof reduce & ReduceBrand; | |
const myMap = map as typeof map & MapBrand; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
name: 'Animalia', | |
subclassification: [ | |
{ | |
name: 'Chordata', | |
subclassification: [ | |
{name: 'Craniata', subclassification: []}, | |
{name: 'Tunicata', subclassification: []}, | |
{name: 'Cephalochordata', subclassification: []}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12.0.1 acrylic-apple | |
12.0.0 azurite-insight | |
11.2.13 denim-doily | |
11.2.12 glass-grass | |
11.2.11 metal-mountain | |
11.2.10 walnut-tabletop | |
11.2.9 earthenware-nightmare | |
11.2.8 linen-library | |
11.2.7 foam-feather | |
11.2.6 wool-mammoth |
OlderNewer