Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Created March 17, 2016 00:42
Show Gist options
  • Save johnlindquist/af388b7a12afb96e5d07 to your computer and use it in GitHub Desktop.
Save johnlindquist/af388b7a12afb96e5d07 to your computer and use it in GitHub Desktop.
import {Component} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {Observable} from 'rxjs/Rx';
@Component({
selector: 'app',
template: `
{{clock | async | date:'medium'}}
`
})
export class App {
clock = Observable
.interval(1000)
.map(()=> new Date());
}
bootstrap(App);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment