Skip to content

Instantly share code, notes, and snippets.

View jorgeucano's full-sized avatar

Jorge Cano jorgeucano

View GitHub Profile
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@NgModule({
bootstrap: [TestComponent],
})
export class TestModule {}
<div (mouseover)="load = true">Hover to load TestModule</div>
<lazy-af *ngIf="load" moduleName="src/app/test/test.module#TestModule"></lazy-af>
@NgModule({
imports: [LazyModule],
})
export class AppModule {}
"options": {
...
"lazyModules": [ "src/app/test/test.module" ]
}
private mergeAllSnapshots(data: Array<any>) {
return combineLatest(...data)
.switchMap(allData => {
const combined = [];
combined.push([].concat(...allData));
return Observable.of(combined[0]);
}).map(actions => {
return actions.map(a => {
const data = a.payload.doc.data();
const id = a.payload.doc.id;
import { Component, OnInit, OnDestroy } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit, OnDestroy {
title = 'app works!';
RxJS 4 RxJS 5
RxJS 4 RxJS 5
amb race
and No longer implemented
asObservable Exists on Subject only
average No longer implemented
bufferWithCount bufferCount
bufferWithTime bufferTime
concat concat
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://unpkg.com/@reactivex/rxjs@5.0.3/dist/global/Rx.js"></script>
<button class="button">Click</button>