mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
16 lines
342 B
TypeScript
16 lines
342 B
TypeScript
|
interface RegisterRoutesHandler {
|
||
|
($routeProvider): any;
|
||
|
}
|
||
|
|
||
|
const handlers: RegisterRoutesHandler[] = [];
|
||
|
|
||
|
export function applyRouteRegistrationHandlers($routeProvider) {
|
||
|
for (const handler of handlers) {
|
||
|
handler($routeProvider);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export function addRouteRegistrationHandler(fn: RegisterRoutesHandler) {
|
||
|
handlers.push(fn);
|
||
|
}
|