Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import { Observable } from "rxjs";
import { PostsService } from "./../posts.service";
import { Component, OnInit } from "@angular/core";
selector: "app-list",
templateUrl: "",
styleUrls: [""]
export class CategoriesPage implements OnInit {
public categories$: Observable<any>;
public items: Array<{ title: string; note: string; icon: string }> = [];
constructor(private postSrvc: PostsService) {}
ngOnInit() {
this.categories$ = this.postSrvc.fetchPostCategories();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment