registry.ts 342 B

123456789101112131415
  1. interface RegisterRoutesHandler {
  2. ($routeProvider): any;
  3. }
  4. const handlers: RegisterRoutesHandler[] = [];
  5. export function applyRouteRegistrationHandlers($routeProvider) {
  6. for (const handler of handlers) {
  7. handler($routeProvider);
  8. }
  9. }
  10. export function addRouteRegistrationHandler(fn: RegisterRoutesHandler) {
  11. handlers.push(fn);
  12. }