Skip to content

Instantly share code, notes, and snippets.

@mkubdev
Created October 21, 2020 09:43
Show Gist options
  • Select an option

  • Save mkubdev/d4867b24e1f147e3239e505e88ec9c28 to your computer and use it in GitHub Desktop.

Select an option

Save mkubdev/d4867b24e1f147e3239e505e88ec9c28 to your computer and use it in GitHub Desktop.
import { Component, OnInit, OnDestroy } from '@angular/core';
import { PageService } from '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 => {
console.log("page", res)
this.page = res;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment