Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created March 2, 2018 09:27
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/a7191356cc3b70e8fe2e279ac9967aa3 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/a7191356cc3b70e8fe2e279ac9967aa3 to your computer and use it in GitHub Desktop.
@Component({
template: `<app-presentation *ngIf="data" [data]="data"></app-presentation>`
})
export class PageComponent {
data: SomeData;
constructor(protected someService: SomeService) {}
ngOnInit() {
this.someService.getData().subscribe((data) => {
this.data = data;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment