Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created April 12, 2018 18:53
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/604acb6ba34b33ad7fb0b36898463301 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/604acb6ba34b33ad7fb0b36898463301 to your computer and use it in GitHub Desktop.
import { catchOffline } from '@ngx-pwa/offline';
@Component({
template: `<p>{{data$ | async}}</p>`
})
export class SomeComponent {
data$ = this.dataService.getData().pipe(catchOffline());
constructor(protected dataService: DataService) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment