(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import { Injectable } from 'angular2/core'; | |
| import { Storage } from './storage'; | |
| import { CurrentUser } from '../interfaces/common'; | |
| @Injectable() | |
| export class Authentication{ | |
| private _storageService : Storage; | |
| private _userKey : string = "CURRENT_USER"; | |
| constructor(storageService : Storage){ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // MultiExporter.jsx | |
| // Version 0.1 | |
| // Version 0.2 Adds PNG and EPS exports | |
| // Version 0.3 Adds support for exporting at different resolutions | |
| // Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize | |
| // Version 0.5 Fixed cropping issues | |
| // Version 0.6 Added inner padding mode to prevent circular bounds clipping | |
| // | |
| // Copyright 2013 Tom Byrne | |
| // Comments or suggestions to tom@tbyrne.org |
| function go() { | |
| var userId = prompt('Username?', 'Guest'); | |
| checkIfUserExists(userId); | |
| } | |
| var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users'; | |
| function userExistsCallback(userId, exists) { | |
| if (exists) { | |
| alert('user ' + userId + ' exists!'); |