ScullyRoutesService

Overview

The ScullyRoutesService provides methods and observables that allow you to know the routes rendered by Scully.

Interface

The ScullyRoutesService's types come from the ScullyRoute interface:

export interface ScullyRoute {
  route: string;
  title?: string;
  slugs?: string[];
  published?: boolean;
  slug?: string;
  [prop: string]: any;
}

Observables & Methods

available$: Observable<ScullyRoute[]>

Returns routes containing the property published with a value of true.

unPublished$: Observable<ScullyRoute[]>

Returns routes containing the property published with a value of false.

topLevel$: Observable<ScullyRoute[]>

Returns the top-level routes.

getCurrent(): Observable<ScullyRoute>

A method that returns the current location.

reload(): void

A method that checks if new routes have been added to the scully-routes.json file.