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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({name: 'keys'}) | |
export class KeysPipe implements PipeTransform { | |
transform(value, args:string[]) : any { | |
let keys = []; | |
for (let key in value) { | |
keys.push({key: key, value: value[key]}); | |
} | |
return keys; |
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
(function ($) { | |
$('input.round').wrap('<div class="round" />').each(function () { | |
var $input = $(this); | |
var $div = $input.parent(); | |
var min = $input.data('min'); | |
var max = $input.data('max'); | |
var ratio = ($input.val() - min) / (max - min); | |
var color = $input.data('color') ? $input.data('color') : "rgba(33,33,33,0.6)"; |