By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| @mixin gradient($from, $to) { | |
| /* fallback/image non-cover color */ | |
| background-color: $from; | |
| /* Firefox 3.6+ */ | |
| background-image: -moz-linear-gradient($from, $to); | |
| /* Safari 4+, Chrome 1+ */ | |
| background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); |
| /* TYPESCRIPT */ | |
| import { Injectable } from '@angular/core'; | |
| @Injectable() | |
| export class ResponsiveService { | |
| constructor() { | |
| window.onresize = this.callSubscribers | |
| } |
| $ cf buildpacks | |
| Getting buildpacks... | |
| buildpack position enabled locked filename | |
| staticfile_buildpack 1 true false staticfile_buildpack-cached-v1.2.1.zip | |
| java_buildpack 2 true false java-buildpack-v3.1.zip | |
| ruby_buildpack 3 true false ruby_buildpack-cached-v1.6.1.zip | |
| nodejs_buildpack 4 true false nodejs_buildpack-cached-v1.5.0.zip | |
| go_buildpack 5 true false go_buildpack-cached-v1.5.0.zip | |
| python_buildpack 6 true false python_buildpack-cached-v1.5.0.zip |
| private tooltip: any; private total: number; | |
| constructor(private service: DataService) { | |
| // ... | |
| this.total = this.dataSource.reduce((sum, it) => sum += it.abs, 0); | |
| } | |
| ngOnInit() { | |
| // ... | |
| this.tooltip = d3.select('#pie') // or d3.select('#bar') |
| <!DOCTYPE html> | |
| <html class="html"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
| <style> | |
| .axis text { | |
| font: 10px sans-serif; |
| /* MongoDB-UserCollection-Data-Change_Send-Change-SocketIO.js */ | |
| 'use strict' | |
| module.exports = function ( | |
| app, | |
| io, | |
| User // Collection Name | |
| ) { | |
| // SET WATCH ON COLLECTION | |
| const changeStream = User.watch(); |
| /* MongoDB-UserCollection-Data-Change_Send-Change-SocketIO.js */ | |
| 'use strict' | |
| module.exports = function ( | |
| app, | |
| io, | |
| User // Collection Name | |
| ) { | |
| // SET WATCH ON COLLECTION | |
| const changeStream = User.watch(); |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| @Effect() | |
| search$: Observable<Action> = this.actions$.pipe( | |
| ofType(SearchActions.SEARCH), | |
| switchMap(action => { | |
| const query = action.payload; | |
| return [new FetchPanel1Data(query), new FetchPanel2Data(query)]; | |
| }) | |
| ); |