mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
18 lines
420 B
TypeScript
18 lines
420 B
TypeScript
import { route } from 'angular';
|
|
|
|
interface RegisterRoutesHandler {
|
|
($routeProvider: route.IRouteProvider): any;
|
|
}
|
|
|
|
const handlers: RegisterRoutesHandler[] = [];
|
|
|
|
export function applyRouteRegistrationHandlers($routeProvider: route.IRouteProvider) {
|
|
for (const handler of handlers) {
|
|
handler($routeProvider);
|
|
}
|
|
}
|
|
|
|
export function addRouteRegistrationHandler(fn: RegisterRoutesHandler) {
|
|
handlers.push(fn);
|
|
}
|