import { Location } from "@angular/common";

export class AngularUtils {
  /**
   * 获取应用地址
   * @param loc Location
   * @returns 
   */
  public static getAppUrl(loc : Location): string {
    const angularRoute = loc.path();
    const url = window.location.href;
    const appUrl = url.replace(angularRoute, '');
    return appUrl;
  }

}
