mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -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);
|
|
}
|