自用零散博文-config.ts

export type Data = {
  [name: string]: any
};

export type ResolveData = {
  [name: string]: any
};

export type LoadChildrenCallback = () => Type| Promise>| Observable>;

export type LoadChildren = string | LoadChildrenCallback;

export interface Route {
  path?: string;
  pathMatch?: string;
  component?: Type;
  redirectTo?: string;
  outlet?: string;
  canActivate?: any[];
  canActivateChild?: any[];
  canDeactivate?: any[];
  canLoad?: any[];
  data?: Data;
  resolve?: ResolveData;
  children?: Route[];
  loadChildren?: LoadChildren;
}

export function validateConfig(config: Routes): void {
  config.forEach(validateNode);
}

你可能感兴趣的:(Angular2,自用零散博文)