Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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