Skip to content

Instantly share code, notes, and snippets.

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