Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created April 12, 2018 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrilletuzi/7a54a349da89bff007ff197e4316e5ae to your computer and use it in GitHub Desktop.
Save cyrilletuzi/7a54a349da89bff007ff197e4316e5ae to your computer and use it in GitHub Desktop.
@Component({
template: `<p>{{data$ | async}}</p>`
})
export class SomeComponent {
data$ = this.dataService.getData().pipe(catchError(() => ''));
constructor(protected dataService: DataService) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment