I hereby claim:
- I am jsayol on github.
- I am jsayol (https://keybase.io/jsayol) on keybase.
- I have a public key ASAhefrs89AKPH9_7oqaGlObjj0S-n5cHuuYu2AFPm7vPAo
To claim this, I am signing this object:
const show$ = Observable.timer(0, 1000); | |
const hide$ = Observable.timer(750, 1000); | |
const blinker$ = Observable.merge( | |
show$, | |
hide$ | |
); |
const show$ = Observable.timer(0, 1000); | |
const hide$ = Observable.timer(750, 1000); | |
import { | |
Directive, TemplateRef, Input, ChangeDetectorRef, ViewContainerRef, | |
IterableDiffers, OnChanges, SimpleChanges, SimpleChange | |
} from '@angular/core'; | |
import { NgFor } from "@angular/common"; | |
import { NgForRow } from "@angular/common/src/directives/ng_for"; | |
@Directive({ | |
selector: '[ngFor][ngForIn]' | |
}) |
import { | |
Directive, TemplateRef, Input, ChangeDetectorRef, ViewContainerRef, | |
IterableDiffers, OnChanges, SimpleChanges, SimpleChange | |
} from '@angular/core'; | |
import { NgFor } from "@angular/common"; | |
import { NgForRow } from "@angular/common/src/directives/ng_for"; | |
@Directive({ | |
selector: '[ngFor][ngForIn]' | |
}) |
ngOnChanges(changes: SimpleChanges): void { | |
if ('ngForIn' in changes) { | |
this.ngForOf = Object.keys(this.ngForIn); | |
const currentValue: any[] = Object.keys(changes['ngForIn'].currentValue); | |
const previousValue: any[] = Object.keys(changes['ngForIn'].previousValue); | |
changes['ngForOf'] = new SimpleChange(previousValue, currentValue); | |
super.ngOnChanges(changes); | |
} |
@Directive({ | |
selector: '[ngFor][ngForIn]' | |
}) | |
export class NgForIn extends NgFor implements OnChanges { | |
@Input() ngForIn: any; | |
constructor(viewContainer: ViewContainerRef, | |
template: TemplateRef<NgForRow>, | |
differs: IterableDiffers, |
/* | |
* This directive simply allows to use "let item in items" instead of "let item of items" | |
* with ngFor. Its functionality remains unchanged (that is, it still loops over the iterable's values) | |
* | |
* To use it just import it into your module and add it to its "declarations". | |
*/ | |
import { | |
Directive, TemplateRef, Input, ChangeDetectorRef, ViewContainerRef, | |
IterableDiffers, OnChanges, SimpleChanges |
I hereby claim:
To claim this, I am signing this object:
/* | |
* Generate a firebase push ID | |
=========================== | |
* Same code used by the Firebase Web SDK (with minor modifications) except the timestamp used | |
* is not corrected to account for a possible offset between the client's and server's clocks. | |
*/ | |
var genPushId = function () { | |
var prevTime = 0 | |
var randChars = []; |