Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Resilience Patterns in Angular

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Resilience Patterns in Angular

Improve UX in Angular Applications by using common resilience patterns

Avatar for Maik Schöneich

Maik Schöneich

March 23, 2018

More Decks by Maik Schöneich

Other Decks in Programming

Transcript

  1. @Injectable() class MessageBus { private messageBus: Rx.Subject; constructor() { this.messageBux

    = new Rx.Subject(); } subscribe<T>(action: (value:T) => void) { this.messageBus.subscribe(action); } send<T>(value: T) { this.messageBus.next(value); } }
  2. @Injectable() class MyService { constructor(private http: HttpClient) {} getData() {

    return this.http.get("/api/data") .pipe( timeout(3000) // in ms ) } }