Skip to content

Instantly share code, notes, and snippets.

@stefansheva
Created April 19, 2020 13:03
Show Gist options
  • Save stefansheva/207775afa66f48456e084f0d1df23cca to your computer and use it in GitHub Desktop.
Save stefansheva/207775afa66f48456e084f0d1df23cca to your computer and use it in GitHub Desktop.
import { Component, OnInit, OnDestroy } from '@angular/core';
import { PageService } from 'src/services/page.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
contents: any = [];
page: any;
landingPageId = 1;
constructor(private pageSvc: PageService) {
}
ngOnInit(): void {
this.pageSvc.getPage(this.landingPageId).subscribe(res => {
this.page = res;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment