import { Component , OnInit } from '@angular/core' ; import { ScullyRoute , ScullyRoutesService } from '@scullyio/ng-lib' ; import { Observable } from 'rxjs' ; import { map } from 'rxjs/operators' ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] , } ) export class AppComponent implements OnInit { posts$ : Observable < ScullyRoute [ ] > ; constructor ( private srs ) { } ngOnInit ( ) { this . posts$ = this . srs . available$ . pipe ( map ( routeList => { return routeList . filter ( ( route ) => route . route . startsWith ( `/blog/` ) ) ; } ) ) ; } }