@rero/ng-core
Version:
RERO angular core library.
50 lines (49 loc) • 1.3 kB
TypeScript
import { RouteInterface } from './route-interface';
import * as i0 from "@angular/core";
export declare class RouteCollectionService {
/**
* Collection of routes
*/
private collection;
/**
* Add route on collection
* @param route - RouteInterface
* @return this - RouteCollectionService
*/
addRoute(route: RouteInterface): RouteCollectionService;
/**
* Delete route on collection
* @param name - string
* @return boolean
*/
deleteRoute(name: string): boolean;
/**
* Check if route is present to the collection
* @param name - string
* @return boolean
*/
hasRoute(name: string): boolean;
/**
* Get route by name
* @param name - string
* @return mixed - RouteInterface | null
*/
getRoute(name: string): RouteInterface | null;
/**
* Get All routes
* @return routes separated by comma
*/
getRoutes(): any[];
/**
* Return a array of route name
* @return array
*/
availableRoutesName(): any[];
/**
* Count available routes
* @return number;
*/
size(): number;
static ɵfac: i0.ɵɵFactoryDeclaration<RouteCollectionService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<RouteCollectionService>;
}