Router Options


The router itself can be configured using various options:

  • router.useFacesContext(true);
  • router.trace(true);
  • router.description('My first REST API');
  • router.enableCORS();
    Allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.
  • router.corsAllowMethodValue(['GET','POST','OPTIONS']);
  • router.corsOrigin(['http://localhost:4200']);
    List of strings
  • router.corsAllowCredentials();
  • router.corsTokenHeader(string)
  • router.typeAHeadResolver(TypeAheadResolver)
  • router.userInformationResolver(UserInformationResolver)
  • router.identityMapProvider (IdentityMapProvider)
  • router.version(string)