by Wassim Chegham (@manekinekko)
From this awesome animation, originally from this tweet
getData( a => {
getMoreData(a, b => {| language: node_js | |
| node_js: | |
| - "6" | |
| script: | |
| - npm run lint | |
| - npm run build | |
| - npm test |
| wget -O /dev/null http://cachefly.cachefly.net/100mb.test |
| describe('Quote Service', () => { | |
| let mockApiService: ApiService; | |
| let quoteService: QuoteService; | |
| let mockResponse = [ ... ]; // mock todos response | |
| beforeEach(() => { | |
| mockApiService = { get: null } as ApiService; | |
| spyOn(mockApiService, 'get').and.returnValue(Observable.of({ | |
| json: () => mockResponse |
by Wassim Chegham (@manekinekko)
From this awesome animation, originally from this tweet
getData( a => {
getMoreData(a, b => {| import { Component, OnInit, OnDestroy } from '@angular/core'; | |
| import { Observable } from 'rxjs/Observable'; | |
| import { Subject } from 'rxjs/Subject'; | |
| import { MyService } from './MyService.ts'; | |
| import 'rxjs/add/operator/takeUntil'; | |
| @Component({ | |
| selector: 'my-rad-component', |
| <div *ngFor="let person of persons"> | |
| <app-person [data]="person" (upVote)="upVote(person, $event)"></app-person> | |
| </div> |
| <app-locale i18n-phrase-key phrase-key="Phrase One" | |
| i18n-phrase-key-2 phrase-key-2="Phrase Two" | |
| ... | |
| > | |
| </app-locale> |
| @ViewChild(ChildComponent, {read: ElementRef}) child: ElementRef; |