https://github.com/angular/angular
Raw File
Tip revision: 7001ef642942e0a17594f3b9ee359011f5a6cb00 authored by Jessica Janiuk on 02 December 2020, 18:08:46 UTC
release: cut the v11.0.3 release (#39931)
Tip revision: 7001ef6
deployment.service.ts
import { Injectable } from '@angular/core';
import { LocationService } from 'app/shared/location.service';
import { environment } from 'environments/environment';

/**
 * Information about the deployment of this application.
 */
@Injectable()
export class Deployment {
  /**
   * The deployment mode set from the environment provided at build time;
   * or overridden by the `mode` query parameter: e.g. `...?mode=archive`
   */
  mode: string = this.location.search().mode || environment.mode;

  constructor(private location: LocationService) {}
}
back to top